@c4a/context-cli 0.6.1 → 0.6.3

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 (246) hide show
  1. package/README.md +77 -12
  2. package/README.zh-CN.md +202 -0
  3. package/cli.js +74066 -45247
  4. package/docs/context-debug-event-v1.schema.json +29 -0
  5. package/docs/context-debug-replay-v1.schema.json +33 -0
  6. package/docs/debug-tracing.md +86 -0
  7. package/docs/quickstart.md +23 -5
  8. package/package.json +8 -3
  9. package/plugins/README.md +60 -118
  10. package/plugins/README_CN.md +51 -102
  11. package/plugins/VERSION +1 -1
  12. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  13. package/plugins/claude/commands/continue.md +61 -10
  14. package/plugins/claude/commands/init.md +26 -11
  15. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  16. package/plugins/codex/skills/continue/SKILL.md +61 -11
  17. package/plugins/codex/skills/init/SKILL.md +28 -14
  18. package/plugins/cursor/.cursor-plugin/plugin.json +2 -3
  19. package/plugins/cursor/README.md +2 -2
  20. package/plugins/cursor/commands/context-continue.md +61 -10
  21. package/plugins/cursor/commands/context-init.md +26 -11
  22. package/plugins/skills/context-continue/SKILL.md +61 -11
  23. package/plugins/skills/context-init/SKILL.md +28 -14
  24. package/providers/context/actions/accept-package-templates.yaml +5 -0
  25. package/providers/context/actions/align-next.yaml +6 -0
  26. package/providers/context/actions/apply-managed-review.yaml +5 -0
  27. package/providers/context/actions/apply-structure-confirmation.yaml +5 -0
  28. package/providers/context/actions/build-next.yaml +5 -0
  29. package/providers/context/actions/capture-next.yaml +5 -0
  30. package/providers/context/actions/close-approved-knowledge.yaml +5 -0
  31. package/providers/context/actions/compile-next.yaml +5 -0
  32. package/providers/context/actions/configure-code-extraction.yaml +5 -0
  33. package/providers/context/actions/configure-document-capture.yaml +5 -0
  34. package/providers/context/actions/configure-package-output.yaml +5 -0
  35. package/providers/context/actions/configure-prose-lifecycle.yaml +5 -0
  36. package/providers/context/actions/extract-next.yaml +5 -0
  37. package/providers/context/actions/inspect-document-classification.yaml +5 -0
  38. package/providers/context/actions/inspect-repository-recovery.yaml +6 -0
  39. package/providers/context/actions/inspect-review.yaml +5 -0
  40. package/providers/context/actions/inspect-structure.yaml +5 -0
  41. package/providers/context/actions/maintain-evidence.yaml +6 -0
  42. package/providers/context/actions/materialize-context-view.yaml +8 -0
  43. package/providers/context/actions/reconcile-review-identities.yaml +5 -0
  44. package/providers/context/actions/register-source-batch.yaml +7 -0
  45. package/providers/context/actions/repair-project-entry.yaml +5 -0
  46. package/providers/context/actions/repair-verification.yaml +5 -0
  47. package/providers/context/actions/repair-workspace-state.yaml +5 -0
  48. package/providers/context/actions/restore-repository-sources.yaml +7 -0
  49. package/providers/context/codes.yaml +41 -0
  50. package/providers/context/graphs/workspace.yaml +536 -0
  51. package/providers/context/manifest.json +700 -0
  52. package/providers/context/provider.yaml +12 -0
  53. package/providers/context/resources/diagnostics/projection-stale.md +13 -0
  54. package/providers/context/resources/diagnostics/verification.md +21 -0
  55. package/providers/context/resources/diagnostics/workspace-state.md +27 -0
  56. package/providers/context/resources/dialogue/code-extraction.md +34 -0
  57. package/providers/context/resources/dialogue/document-capture.md +29 -0
  58. package/providers/context/resources/dialogue/document-classification.md +33 -0
  59. package/providers/context/resources/dialogue/evidence-maintenance.md +26 -0
  60. package/providers/context/resources/dialogue/human-gates.md +34 -0
  61. package/providers/context/resources/dialogue/knowledge-review.md +27 -0
  62. package/providers/context/resources/dialogue/package-output.md +30 -0
  63. package/providers/context/resources/dialogue/repository-source-recovery.md +23 -0
  64. package/providers/context/resources/dialogue/source-boundary.md +29 -0
  65. package/providers/context/resources/dialogue/structure-confirmation.md +44 -0
  66. package/providers/context/resources/manuals/guides/lark-resources.md +121 -0
  67. package/providers/context/resources/manuals/guides/package-outputs.md +267 -0
  68. package/providers/context/resources/manuals/reference/package-templates.md +378 -0
  69. package/providers/context/resources/manuals/reference/project-api.md +825 -0
  70. package/providers/context/resources/manuals/reference/template-variables.md +248 -0
  71. package/providers/context/resources/procedures/close-and-build.md +23 -0
  72. package/providers/context/resources/procedures/code-extraction.md +50 -0
  73. package/providers/context/resources/procedures/document-capture.md +49 -0
  74. package/providers/context/resources/procedures/document-classification.md +22 -0
  75. package/providers/context/resources/procedures/evidence-maintenance.md +20 -0
  76. package/providers/context/resources/procedures/knowledge-review.md +34 -0
  77. package/providers/context/resources/procedures/package-output.md +37 -0
  78. package/providers/context/resources/procedures/project-configuration.md +21 -0
  79. package/providers/context/resources/procedures/prose-align.md +68 -0
  80. package/providers/context/resources/procedures/prose-compile.md +23 -0
  81. package/providers/context/resources/procedures/repository-source-recovery.md +43 -0
  82. package/providers/context/resources/procedures/source-boundary.md +48 -0
  83. package/{plugins/codex/skills/continue/references/internal-procedures/skill-source-scope/references/capture-source.md → providers/context/resources/procedures/source-capture-detailed.md} +54 -19
  84. package/providers/context/resources/procedures/verify-and-repair.md +31 -0
  85. package/{plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/candidate-resolution.md +17 -2
  86. package/{plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/density-profile.md +11 -0
  87. package/{plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/gates.md +13 -0
  88. package/{plugins/cursor/skills/skill-prose-align/references/internal-procedures → providers/context/resources/semantic/align}/structure-planning.md +62 -12
  89. package/providers/context/resources/semantic/compile/index.md +31 -0
  90. package/providers/context/resources/views/package-current.yaml +6 -0
  91. package/providers/context/resources/views/review-current.yaml +6 -0
  92. package/providers/context/resources/views/source-boundary.yaml +6 -0
  93. package/providers/context/resources/views/source-current.yaml +6 -0
  94. package/providers/context/resources/views/structure-current.yaml +6 -0
  95. package/providers/context/resources/views/verification-current.yaml +6 -0
  96. package/providers/context/resources/views/workspace-current.yaml +6 -0
  97. package/providers/context/schemas/evidence-maintenance-input.schema.json +30 -0
  98. package/providers/context/schemas/prose-structure-batch.schema.json +35 -0
  99. package/providers/context/schemas/repository-source-recovery.schema.json +40 -0
  100. package/providers/context/schemas/source-batch-input.schema.json +189 -0
  101. package/providers/context/scripts/render-context-view.mjs +21 -0
  102. package/plugins/claude/skills/skill-continue-workflow/SKILL.md +0 -235
  103. package/plugins/claude/skills/skill-init-workspace/SKILL.md +0 -74
  104. package/plugins/claude/skills/skill-package-output/SKILL.md +0 -180
  105. package/plugins/claude/skills/skill-prose-align/SKILL.md +0 -322
  106. package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  107. package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  108. package/plugins/claude/skills/skill-prose-compile/SKILL.md +0 -287
  109. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  110. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  111. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  112. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  113. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  114. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  115. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  116. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  117. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  118. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  119. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  120. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  121. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  122. package/plugins/claude/skills/skill-review-gate/SKILL.md +0 -138
  123. package/plugins/claude/skills/skill-source-scope/SKILL.md +0 -525
  124. package/plugins/claude/skills/skill-source-scope/references/capture-source.md +0 -201
  125. package/plugins/codex/skills/continue/references/internal-procedures/skill-continue-workflow.md +0 -235
  126. package/plugins/codex/skills/continue/references/internal-procedures/skill-init-workspace.md +0 -74
  127. package/plugins/codex/skills/continue/references/internal-procedures/skill-package-output.md +0 -180
  128. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  129. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  130. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  131. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  132. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align.md +0 -322
  133. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  134. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  135. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  136. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  137. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  138. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  139. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  140. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  141. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  142. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  143. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  144. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  145. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  146. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile.md +0 -287
  147. package/plugins/codex/skills/continue/references/internal-procedures/skill-review-gate.md +0 -138
  148. package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +0 -525
  149. package/plugins/codex/skills/init/references/internal-procedures/skill-continue-workflow.md +0 -235
  150. package/plugins/codex/skills/init/references/internal-procedures/skill-init-workspace.md +0 -74
  151. package/plugins/codex/skills/init/references/internal-procedures/skill-package-output.md +0 -180
  152. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  153. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  154. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  155. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align.md +0 -322
  156. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  157. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  158. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  159. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  160. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  161. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  162. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  163. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  164. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  165. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  166. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  167. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  168. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  169. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile.md +0 -287
  170. package/plugins/codex/skills/init/references/internal-procedures/skill-review-gate.md +0 -138
  171. package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
  172. package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +0 -525
  173. package/plugins/cursor/skills/skill-continue-workflow/SKILL.md +0 -235
  174. package/plugins/cursor/skills/skill-init-workspace/SKILL.md +0 -74
  175. package/plugins/cursor/skills/skill-package-output/SKILL.md +0 -180
  176. package/plugins/cursor/skills/skill-prose-align/SKILL.md +0 -322
  177. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  178. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  179. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  180. package/plugins/cursor/skills/skill-prose-compile/SKILL.md +0 -287
  181. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  182. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  183. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  184. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  185. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  186. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  187. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  188. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  189. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  190. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  191. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  192. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  193. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  194. package/plugins/cursor/skills/skill-review-gate/SKILL.md +0 -138
  195. package/plugins/cursor/skills/skill-source-scope/SKILL.md +0 -525
  196. package/plugins/cursor/skills/skill-source-scope/references/capture-source.md +0 -201
  197. package/plugins/skills/context-continue/references/internal-procedures/skill-continue-workflow.md +0 -235
  198. package/plugins/skills/context-continue/references/internal-procedures/skill-init-workspace.md +0 -74
  199. package/plugins/skills/context-continue/references/internal-procedures/skill-package-output.md +0 -180
  200. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  201. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  202. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  203. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  204. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align.md +0 -322
  205. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  206. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  207. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  208. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  209. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  210. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  211. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  212. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  213. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  214. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  215. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  216. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  217. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  218. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile.md +0 -287
  219. package/plugins/skills/context-continue/references/internal-procedures/skill-review-gate.md +0 -138
  220. package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
  221. package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +0 -525
  222. package/plugins/skills/context-init/references/internal-procedures/skill-continue-workflow.md +0 -235
  223. package/plugins/skills/context-init/references/internal-procedures/skill-init-workspace.md +0 -74
  224. package/plugins/skills/context-init/references/internal-procedures/skill-package-output.md +0 -180
  225. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  226. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  227. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  228. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  229. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align.md +0 -322
  230. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  231. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  232. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  233. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  234. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  235. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  236. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  237. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  238. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  239. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  240. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  241. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  242. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  243. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile.md +0 -287
  244. package/plugins/skills/context-init/references/internal-procedures/skill-review-gate.md +0 -138
  245. package/plugins/skills/context-init/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
  246. package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +0 -525
@@ -1,81 +0,0 @@
1
- # Disposition Semantics
2
-
3
- Consult this reference when a compile/review issue looks like unsupported
4
- content, stale evidence, replacement, withdrawal, removal, or source
5
- retargeting.
6
-
7
- Use only the current workflow surfaces. Do not introduce extra disposition
8
- command names or hidden mode-specific payloads. If the current CLI schema does
9
- not expose a write shape, route the issue to structure confirmation,
10
- review/user confirmation, or `unresolved[]`.
11
-
12
- ## Current Disposition Routes
13
-
14
- | Situation | Current route |
15
- |---|---|
16
- | Source span can be mirrored directly | Omit `content`; let compile materialize `verbatim`. |
17
- | Source-backed wording needs translation, compression, or reorganization | Do not write it in compile. Split the evidence into source-mirrored sections, ask for structure revision, or leave the issue unresolved for user review. |
18
- | Evidence is citation-eligible but intentionally not written | Use `skip` only when the current compile schema exposes it and the reason is explicit; otherwise ask the user or leave `unresolved[]`. |
19
- | Existing approved section needs a source-backed correction | Use `update` only when `node-context` exposes the target and the current schema supports update. |
20
- | New evidence changes the meaning of an existing approved section | Stop and route to user/structure review; do not emulate replacement with `update` or summarized body text. |
21
- | Approved content is no longer supported by current source evidence | Stop and route to user/structure review. Do not physically remove content from compile. |
22
- | Source ref is stale or points at a moved span | Repair with current CLI source-ref views. Do not invent a hidden source-retargeting action. |
23
- | Evidence belongs under another node, section, or relation | Return to prose align and revise structure ownership or edges. |
24
- | Claim is unsupported by cited evidence | Remove or narrow the claim, cite stronger evidence, or return to structure. User permission cannot make unsupported evidence valid. |
25
-
26
- ## Unsupported Content
27
-
28
- Unsupported content means the reader-facing claim adds facts, scope, direction,
29
- terms, or conclusions that the cited source refs do not contain.
30
-
31
- Do not handle unsupported content by:
32
-
33
- - converting it to a vague summary;
34
- - silently writing `empty`;
35
- - treating user approval as evidence;
36
- - physically deleting approved knowledge from compile;
37
- - copying a stronger-looking source ref from another node or section.
38
-
39
- The valid repair paths are:
40
-
41
- 1. narrow the action to what the owned refs support;
42
- 2. cite stronger refs owned by the same planned section;
43
- 3. split unrelated facts into separately supported actions;
44
- 4. return to align when ownership or relationship structure is wrong;
45
- 5. ask the user only for business choice, not for permission to bypass evidence.
46
-
47
- ## Replacement And Withdrawal
48
-
49
- Changing approved knowledge is higher risk than adding a new source-backed
50
- section.
51
-
52
- - `update` is for the same section identity when meaning does not change.
53
- - Replacement is for a meaning change where the previous section should remain
54
- auditable and the replacement is source-backed.
55
- - Withdrawal is for content that should no longer be active but should remain
56
- auditable.
57
- - Physical deletion is not a compile disposition in the current workflow.
58
-
59
- The current compile action schema does not expose replacement or withdrawal as
60
- write operations. Do not emulate them with summarized body text, an `update`, or
61
- a hidden field. Stop and route to the next appropriate gate.
62
-
63
- ## Stale Evidence And Source Retargeting
64
-
65
- Source retargeting is expressed as current source-ref repair:
66
-
67
- - read only current CLI evidence views;
68
- - use the canonical source refs returned by those views;
69
- - revalidate before staging;
70
- - if no surviving source span supports the previous claim, route to user/structure
71
- review, no-write confirmation, or unresolved structure review.
72
-
73
- Do not create a hidden source-retargeting decision or patch source refs by hand.
74
-
75
- ## Self-verify
76
-
77
- - [ ] No non-current disposition mode name was emitted as a current payload field.
78
- - [ ] Unsupported evidence was repaired, removed, or returned upstream.
79
- - [ ] Replacement/withdrawal did not appear as unsupported compile payload fields.
80
- - [ ] No compile path physically removed approved knowledge.
81
- - [ ] Stale source refs were repaired from CLI views, not guessed.
@@ -1,55 +0,0 @@
1
- # Context-only Leakage and Ownership Repair
2
-
3
- Consult this reference when current compile validation or review diagnostics say
4
- a source ref is not owned by the selected planned section, is context-only, or
5
- belongs to another node/section.
6
-
7
- ## What The Diagnostic Means
8
-
9
- Compile is source-bound to the confirmed structure. A section action may cite
10
- only source refs owned by the planned section it targets. Background/context
11
- evidence may explain the node, but it cannot become the support basis for an
12
- active section until align confirms that ownership.
13
-
14
- This is a hard boundary. Do not paraphrase context-only evidence, do not switch
15
- to a looser summary, and do not add an unsourced claim to avoid the diagnostic.
16
-
17
- ## Repair Routes
18
-
19
- Use the same three-way repair discipline as the current semantic review gate,
20
- and express it through the current compile/align surfaces:
21
-
22
- | Situation | Route |
23
- |---|---|
24
- | Another owned planned-section ref supports the same claim | Repair the compile action to cite that owned ref from the same node-context and revalidate. Do not keep the leaking ref as secondary evidence. |
25
- | No owned evidence exists and the claim is not load-bearing for this node | Ask the user whether to leave it unwritten; if confirmed, emit a current `skip` with a business reason when the schema supports reviewed skips, or leave an align handoff note. |
26
- | The context-only / secondary evidence contains facts this node legitimately needs | Stop compile and return to prose align. Revise `context.structure.v1` so the source refs are owned by the correct planned section, or keep an `unresolved[]` ownership issue. |
27
- | The evidence belongs under another node | Return to prose align and move the planned section/source refs to that node, or add an unresolved structure issue. |
28
- | The ownership problem indicates a missing relation | Return to prose align and add a source-backed typed edge or unresolved relation. |
29
-
30
- Do not collapse the second and third rows into a generic skip. If the evidence
31
- is load-bearing, skipping hides a structure defect; the correct long-term
32
- repair is to reconfirm structure.
33
-
34
- ## What Not To Do
35
-
36
- - Do not use full-text/detail views as an ownership upgrade. They expose text;
37
- they do not change the confirmed structure.
38
- - Do not cite a secondary or context-only ref for active body text.
39
- - Do not paraphrase the offending evidence while still citing it. The support
40
- boundary remains wrong even if the prose changes.
41
- - Do not silently skip to clear the diagnostic; this may hide a real evidence
42
- gap or missing ownership decision.
43
- - Do not switch the action to a different node, target section, or edge merely
44
- to dodge the ownership rule. Return to align and reconfirm the structure.
45
- - Do not add a cross-node link inside verbatim content.
46
- - Do not write content that depends on evidence outside the planned section.
47
- Return to align first.
48
-
49
- ## Self-verify
50
-
51
- - [ ] Every active compile action cites only refs owned by its planned section.
52
- - [ ] Ownership repairs were revalidated.
53
- - [ ] Structure-level repairs returned to prose align.
54
- - [ ] User-confirmed no-write was used only for non-load-bearing evidence.
55
- - [ ] Context-only evidence was not converted into reader-facing fact text.
@@ -1,93 +0,0 @@
1
- # Scope Review and No-write Discipline
2
-
3
- Consult this reference when you are tempted not to write citation-eligible
4
- evidence, or when a proposed action looks redundant, low-value, miscoped, or
5
- outside the current node.
6
-
7
- ## Core Rule
8
-
9
- No-write is never a shortcut for uncertainty. It is valid only when one of these
10
- conditions is true:
11
-
12
- - the evidence is pure navigation, placeholder, duplicate, or unchanged content;
13
- - the source refs are not owned by the selected planned section and must return
14
- to structure confirmation;
15
- - the user explicitly confirms that this citation-eligible material should not
16
- become active knowledge;
17
- - the current CLI diagnostics instruct a skip/no-write route.
18
-
19
- Unsupported evidence is not a no-write shortcut. First repair the source refs,
20
- narrow the claim, or return to prose align. Schema/source-ref failures must be
21
- fixed, not hidden by skipping.
22
-
23
- ## Scope Review Pass
24
-
25
- Before choosing a no-write outcome for citation-eligible evidence, inspect the
26
- current node context and proposed actions:
27
-
28
- 1. **Covered-by check** — is the same source-backed claim already covered by
29
- another current action, approved section, or confirmed planned section?
30
- - Yes -> skip this action with a precise duplicate/covered-by reason when
31
- the current schema supports skip. Do not call this "omit"; it is a
32
- duplicate decision.
33
-
34
- 2. **Mergeable check** — should this evidence strengthen another write action?
35
- - Yes -> repair that other action only if the current schema exposes a safe
36
- update/merge path and the merged evidence boundary still supports every
37
- sentence. Do not drop the standalone evidence until the repaired action
38
- validates.
39
-
40
- 3. **Wrong node or section check** — does the evidence belong elsewhere?
41
- - Yes -> return to prose align and revise section ownership, node assignment,
42
- or typed edges. Do not paper over a wrong structure with skip decisions.
43
-
44
- 4. **Low-value but citation-eligible / provable low-value check** — can the current evidence prove that this item
45
- is navigation, placeholder, empty, non-knowledge, or outside the package's
46
- intended scope?
47
- - Yes -> ask the user whether to leave it unwritten, presenting the business
48
- claim and evidence in normal language.
49
- - No -> ask the user with the same evidence instead of silently omitting it;
50
- the agent's hunch is not a scope decision.
51
-
52
- 5. **Scope-wide miscope check** — do several items look low-value, or does the
53
- node boundary / planned section split look wrong?
54
- - Yes -> stop compile for this node and return to structure confirmation.
55
- A series of skips is not a substitute for correcting the structure.
56
-
57
- ## User Confirmation
58
-
59
- When user confirmation is needed, ask a concrete question such as:
60
-
61
- ```text
62
- This evidence appears source-backed but low-value for the active knowledge page:
63
- <business claim>
64
-
65
- Should it be left out of this compile round, or should it become a section?
66
- ```
67
-
68
- Only after a specific user answer may the current action be skipped for business
69
- scope reasons. General "continue" permission, delegated execution, or permission
70
- to run commands is not confirmation.
71
-
72
- ## How This Slots Into The Main Procedure
73
-
74
- - In compile drafting, use `skip` only when the current schema supports it and
75
- the reason is explicit.
76
- - In structure repair, put unresolved scope problems in `unresolved[]` or return
77
- to the prose align gate.
78
- - In review, do not approve a no-write outcome merely because it clears the
79
- queue; the user must have seen the relevant evidence and decision.
80
- - No-write decisions are current-phase records only. They are not a substitute
81
- for approved knowledge, and they should not be treated as durable evidence
82
- that the source was fully handled unless the current ledger/diagnostic surface
83
- explicitly records that reviewed skip.
84
-
85
- ## Self-verify
86
-
87
- - [ ] No citation-eligible claim was omitted without duplicate, scope, CLI, or
88
- user-confirmed reason.
89
- - [ ] Covered-by and mergeable checks ran before asking the user to omit.
90
- - [ ] Scope-wide miscope returned to prose align instead of many local skips.
91
- - [ ] Unsupported evidence was repaired or returned upstream, not hidden.
92
- - [ ] Structure problems returned to prose align.
93
- - [ ] User-facing questions did not expose internal ids as the choice.
@@ -1,79 +0,0 @@
1
- # Temporal Priors and Evidence Boundary Pointers
2
-
3
- Consult this reference when current compile or review diagnostics mention:
4
-
5
- - source capture time, stale evidence, or temporal-prior context;
6
- - source-ref boundary problems;
7
- - long `summary` text that may be lost during repair;
8
- - command, config, URL, table, or code-fence evidence.
9
-
10
- ## Temporal Priors
11
-
12
- Temporal information explains context; it does not authorize a write by itself.
13
-
14
- - It can explain why previous approved content may need review.
15
- - It cannot prove a replacement, conflict resolution, or deletion without
16
- source-backed evidence.
17
- - It must not change the default semantic route by itself. A newer capture time
18
- can justify asking a stale-source question; it cannot by itself prove that the
19
- newer wording supersedes older approved knowledge.
20
- - It is never enough on its own to auto-merge, auto-replace, auto-deprecate, or
21
- auto-skip a claim.
22
- - It should appear in user-facing rationale only when it helps the user decide a
23
- concrete conflict or stale-source question.
24
-
25
- Do not copy temporal metadata into compile actions unless the current schema
26
- explicitly accepts that field.
27
-
28
- ## Evidence Boundary Repair
29
-
30
- When a diagnostic says a source ref is invalid, stale, too narrow, too broad, or
31
- owned by the wrong section, repair with current CLI views only:
32
-
33
- - use canonical `source_refs[]` from `node-context`, `source-index`,
34
- `span-detail`, or `span-text`;
35
- - treat nearby refs, line ranges, chunk ids, or headings returned by diagnostics
36
- as repair hints, not automatic broadening permission;
37
- - broaden a range only when the entire broader range supports the final claim;
38
- - split the claim when different sentences require unrelated refs;
39
- - return to prose align when the needed evidence belongs to another planned
40
- section, node, or relation.
41
-
42
- Do not invent line ranges, copy stale refs from unrelated payloads, or cite navigation
43
- text as support for a substantive claim.
44
-
45
- After broadening, narrowing, or splitting evidence boundaries, re-run the
46
- current validate/review route before staging or applying. A source ref that is
47
- plausible to the agent is not accepted until the CLI revalidates it against the
48
- committed snapshot.
49
-
50
- ## Summary Preservation And Reader Body Boundary
51
-
52
- Current compile actions do not author reader-facing body text. The CLI
53
- materializes approved bodies by mirroring validated source refs. Treat summary
54
- as the only LLM-authored prose field in compile actions:
55
-
56
- - `summary` is recall/query aid; it must stay faithful to the action.
57
- - If the cited source can be mirrored directly, prefer omitting `content` and
58
- letting the CLI materialize verbatim.
59
- - Preserve source-backed URLs, tables, command/config/code fences, identifiers,
60
- numbers, and named entities by mirroring the source span or splitting the
61
- section. Do not compress them into compile-written content.
62
- - Do not add `content` or `content_intent` to repair a boundary problem. The
63
- current parser rejects those fields. If a source range cannot be mirrored,
64
- split the section, choose a different source ref, or return to align.
65
- - Do not use summary as a substitute for source-backed reader body.
66
- - Clearing a summary is an explicit choice. If the current schema exposes a
67
- summary field and the previous action had one, carry it forward unless the
68
- repair deliberately removes it.
69
-
70
- ## Self-verify
71
-
72
- - [ ] Temporal context was not used as sole evidence.
73
- - [ ] Every repaired ref came from a current CLI evidence view.
74
- - [ ] Summary was preserved unless a current rule justified changing it.
75
- - [ ] No `content`, `content_intent`, or rewrite-route field was added to a
76
- compile action.
77
- - [ ] Any broadened or split evidence boundary was revalidated before staging or
78
- review apply.
79
- - [ ] No temporal metadata leaked into a schema that does not accept it.
@@ -1,111 +0,0 @@
1
- # User Confirmation Paths
2
-
3
- Consult this reference when weak evidence, conflict resolution, or no-write
4
- scope requires a human choice before compile/review can
5
- continue.
6
-
7
- ## What Counts As Confirmation
8
-
9
- Only a specific user reply to a specific current question counts. These are not
10
- confirmation:
11
-
12
- - delegated mode;
13
- - a blanket "continue" or "yes go ahead" from earlier in the session;
14
- - permission to run shell commands;
15
- - an approval for a different node, section, source, or earlier compile round.
16
-
17
- If you cannot point at the exact current question and answer, ask the user
18
- again or leave the issue unresolved.
19
-
20
- ## When To Ask
21
-
22
- Ask the user when:
23
-
24
- - evidence is weak and may require a business decision before it can be
25
- represented as source-mirrored knowledge;
26
- - two source-backed claims conflict;
27
- - citation-eligible material looks low-value and may be intentionally left out;
28
- - structure ownership or relation intent is ambiguous and cannot be decided from
29
- evidence alone.
30
-
31
- The question should use business language. Do not expose internal source-ref ids,
32
- section ids, or payload paths as the choices.
33
-
34
- ## Weak Support Handling
35
-
36
- Weak support means the cited source refs plausibly support a business decision,
37
- but the agent cannot mirror the reader-facing wording from one continuous source
38
- span without changing meaning.
39
-
40
- Rules:
41
-
42
- - Weak support is not a compile-time license to write summarized or rewritten
43
- body text.
44
- - It is not acceptable for an update, replacement, withdrawal, ownership move,
45
- relation reversal, or section relocation unless stronger source evidence or a
46
- fresh structure confirmation backs that change.
47
- - Present the business claim and the cited evidence meaning to the user. Do not
48
- ask "confirm source_ref X" or expose section ids as the choice.
49
- - If the user confirms, express that confirmation through the current surface:
50
- lifecycle confirmation for structure, or a source-backed skip/unresolved
51
- reason. If the user declines, narrow the claim, cite stronger evidence, split
52
- the section, or leave the item unresolved.
53
-
54
- User confirmation permits weak support; it does not permit unsupported evidence,
55
- contradictory claims, fabricated relationships, or stale source refs.
56
-
57
- ## No-write / Scope Confirmation
58
-
59
- Use this when citation-eligible material looks real but may be intentionally
60
- left unwritten because it is duplicate, navigation-only, out of scope, too weak,
61
- or better owned by another node.
62
-
63
- - If the user confirms no-write, record it as a current `skip` with
64
- `source_refs[]` when the compile schema permits reviewed skips, or as a
65
- structure `unresolved[]` / handoff note when the decision belongs to align.
66
- - If the user declines no-write, revise the structure or compile action into a
67
- concrete source-backed write.
68
- - Do not silently omit citation-eligible evidence merely because it feels low
69
- value. Either cite a reviewed skip, leave an unresolved item, or ask the user.
70
-
71
- ## How To Record The Answer
72
-
73
- Use the current phase surface, not a separate decision schema:
74
-
75
- - For structure confirmation, write the confirmed lifecycle fields only after
76
- the user confirms the structure proposal.
77
- - For no-write scope, emit a current `skip` or `unresolved[]` item only when the
78
- current schema supports it and include the user-facing reason.
79
- - For conflict or weak evidence, repair the compile action, ask another
80
- question, or return to structure confirmation.
81
-
82
- Do not invent confirmation fields. If the current schema has no place to record
83
- the answer, keep it in the user-facing handoff and stop before the write that
84
- would require it.
85
-
86
- ## Grouping Questions
87
-
88
- You may group several questions only when they have the same business decision,
89
- same evidence strength, and same consequence. Do not group:
90
-
91
- - questions with different source boundaries;
92
- - one fact-level decision with one wording decision;
93
- - one item with evidence and another without evidence;
94
- - conflict resolution with no-write scope confirmation.
95
-
96
- When grouping is valid, ask one compact question listing each grouped claim and
97
- the plain-language evidence meaning. If the user confirms, apply the same
98
- current-surface confirmation to every grouped item. When in doubt, ask
99
- separately.
100
-
101
- ## Self-verify
102
-
103
- - [ ] Every confirmed outcome maps to a specific current user answer.
104
- - [ ] The question described the business effect before any schema or command.
105
- - [ ] Structure/no-write confirmation was not inferred from generic approval.
106
- - [ ] Weak support was routed to structure confirmation, stronger evidence,
107
- split sections, or unresolved handoff instead of compile-written body text.
108
- - [ ] Every no-write outcome for citation-eligible evidence has a reviewed skip,
109
- unresolved item, or explicit user-facing handoff.
110
- - [ ] No unsupported evidence was accepted merely because the user allowed the
111
- phase to continue.
@@ -1,194 +0,0 @@
1
- ---
2
- name: semantic-judgment
3
- description: >
4
- Internal semantic repair procedure for the current source-bound compile and
5
- review gates; not a user slash command. It judges support, duplicate/conflict
6
- risk, scope fit, weak evidence, leakage, and user-confirmation needs, then
7
- maps the result back to current structure, compile, review, or user-question
8
- surfaces.
9
- tools:
10
- - Bash
11
- ---
12
-
13
- # semantic-judgment
14
-
15
- Use this only when current compile validation, review diagnostics, or a review
16
- page asks for semantic repair beyond ordinary section drafting. This procedure
17
- does not define a separate write schema. The caller expresses the outcome
18
- through one of the current surfaces:
19
-
20
- - repair the `context.compile-actions.v1` payload;
21
- - return to `context.structure.v1` and mark the issue in `unresolved[]`;
22
- - ask the user a specific confirmation question;
23
- - leave the item unwritten with a source-backed reason.
24
-
25
- ## TL;DR
26
-
27
- - Read only current CLI diagnostics and evidence views. Do not inspect
28
- `sources/`, `unapproved/`, `knowledge/`, `dist/`, host tool results, or JSON
29
- stdout fragments with generic tools.
30
- - Use this procedure for semantic support, duplicate/conflict, omit/scope,
31
- leakage/ownership, temporal-prior, and confirmation questions.
32
- - Never invent facts to make a draft pass. If evidence is weak, either narrow the
33
- claim, cite better source refs, return to structure confirmation, or ask the
34
- user.
35
- - User confirmation must answer the specific current question. General
36
- permission to continue is not confirmation.
37
- - Approval/apply is owned by the review gate. This procedure never runs an apply
38
- command by itself.
39
-
40
- ## Reference Routing
41
-
42
- | Situation | Reference |
43
- |---|---|
44
- | Current diagnostics report context-only or secondary ownership leakage | [semantic-judgment/references/leakage-and-ownership.md](semantic-judgment/references/leakage-and-ownership.md) |
45
- | Current diagnostics include source-ref boundary, temporal-prior, long content, or summary preservation issues | [semantic-judgment/references/temporal-and-evidence.md](semantic-judgment/references/temporal-and-evidence.md) |
46
- | You are considering not writing evidence that otherwise looks citation-eligible | [semantic-judgment/references/scope-review-and-omit.md](semantic-judgment/references/scope-review-and-omit.md) |
47
- | You are classifying unsupported, stale, replacement, withdrawal, or "remove" outcomes | [semantic-judgment/references/disposition-semantics.md](semantic-judgment/references/disposition-semantics.md) |
48
- | A weak-evidence or no-write decision needs explicit user confirmation | [semantic-judgment/references/user-confirmation.md](semantic-judgment/references/user-confirmation.md) |
49
-
50
- <reference>
51
-
52
- ## Judgment Vocabulary
53
-
54
- Use this vocabulary in your repair explanation, user question, or current payload
55
- commentary. Do not emit it as a standalone schema unless the current CLI schema
56
- explicitly asks for matching fields.
57
-
58
- | Judgment | Meaning | Current route |
59
- |---|---|---|
60
- | `supported` | Cited source refs directly support the reader-facing claim. | Keep or repair the compile action. |
61
- | `weak` | Evidence plausibly supports a compression or interpretation, but a human should confirm the business meaning. | Ask the user, narrow/split the evidence boundary, or return to align. Do not add `content` / `content_intent`. |
62
- | `unsupported` | The claim adds facts, scope, terms, or conclusions absent from cited evidence. | Remove/narrow the action, cite stronger evidence, or return to structure. |
63
- | `duplicate` | Another planned or approved section already covers the same claim. | Skip this action with a clear reason or update the existing section only if the schema supports it. |
64
- | `separate` | The claim is distinct and source-backed. | Keep a separate action or planned section. |
65
- | `conflict` | The current claim and existing/planned knowledge disagree. | Ask the user or return to structure; do not auto-resolve. |
66
- | `structure_mismatch` | Evidence belongs under another node/section or needs a missing edge. | Return to prose align and revise confirmed structure. |
67
-
68
- ## Decision Routing
69
-
70
- Semantic reconciliation is expressed only through the current compile/review
71
- gate. Route each judgment to the current flow:
72
-
73
- | Judgment shape | Current route |
74
- |---|---|
75
- | Exact same claim already active | Emit or repair a `skip` action with a duplicate reason. Do not write a second section. |
76
- | Same claim with source-backed correction or refinement | Use `update` only when the current compile schema and node-context expose the target section; otherwise ask the user or return to structure/review instead of silently merging. |
77
- | Additional but separate source-backed boundary | Keep a separate planned section/action when the confirmed structure owns the cited refs. |
78
- | New evidence replaces a previous rule | Stop and ask the user which rule should remain, or return to structure/review. Do not emulate replacement with a compile `update`. |
79
- | Direct contradiction | Ask the user. Do not auto-resolve, and do not rewrite approved knowledge from memory. |
80
- | Evidence is close but not enough | Ask the user, choose a narrower mirrorable ref, split the planned section, or return to align. Weak support is not permission to add missing facts. |
81
- | Useful but no-write / scope-wrong evidence | Run the Scope Review pass and require explicit user confirmation before treating citation-eligible evidence as no-write. |
82
-
83
- Do not emit standalone action names from another surface. Preserve the reasoning,
84
- then express the result through `context.compile-actions.v1`, `context.structure.v1`
85
- `unresolved[]`, review confirmation, or a user question.
86
-
87
- ## Relation And Action Discipline
88
-
89
- Use the full semantic support / duplicate / conflict / disposition decision
90
- model, and map every outcome to a current route:
91
-
92
- | Prepared relation | Current action discipline |
93
- |---|---|
94
- | Exact duplicate | Skip/no-write only when the schema supports a reviewed skip or the current route says the item is already covered. |
95
- | Near duplicate / same claim with source-backed clarification | Prefer `update` only when the target section is exposed and the meaning does not change. |
96
- | Complementary separate claim | Keep separate when the confirmed planned section owns the refs and the claim is source-backed. |
97
- | Replacement / superseding claim | Stop for user or structure review. Current compile must not smuggle replacement through summarized body text or same-section update. |
98
- | Conflict | Ask the user a concrete business question. Do not resolve from source order, status order, or agent preference. |
99
- | Weak support | Ask for confirmation or mirror the source more directly; weak support never authorizes unsupported facts. |
100
- | Wrong node / wrong edge / wrong ownership | Return to prose align and revise `context.structure.v1`. Do not patch body text to compensate for a bad structure. |
101
- | Unsupported / source removed | Narrow or remove the proposed action. If approved knowledge disposition is needed, route to review/structure; compile does not physically remove approved content. |
102
-
103
- Do not accept a "default" semantic decision unless the current CLI explicitly
104
- states that the default is mechanically safe for the current item. A generic
105
- "continue" from the user is not a semantic default and is not user
106
- confirmation. Preserve candidate order and compare only candidates surfaced by
107
- the current CLI view; do not run your own workspace-wide search.
108
-
109
- ## Evidence Boundary Gate
110
-
111
- A compile action must cite only source refs owned by the planned section it
112
- targets. If the proposed reader-facing claim cannot honestly be supported by
113
- those refs:
114
-
115
- 1. Narrow the claim to what the refs support.
116
- 2. Use a CLI-provided broader or adjacent ref only when the whole range supports
117
- the final claim.
118
- 3. Split unrelated facts into separate actions.
119
- 4. Return to structure confirmation when the needed evidence belongs to another
120
- node, another planned section, or an unresolved relation.
121
-
122
- Do not use titles, navigation lines, parent/child lists, or "related" hints as
123
- the sole support for a substantive claim.
124
-
125
- </reference>
126
-
127
- <procedures>
128
-
129
- ### Step 1 — Consume Current Diagnostics
130
-
131
- Start from the current compile validation result, review HTML, or review/apply
132
- diagnostic. Identify:
133
-
134
- - the node and planned section involved;
135
- - the proposed action body, summary, kind, and source refs;
136
- - listed candidate sections or approved sections, if the view provides them;
137
- - whether the issue is support, duplicate/conflict, leakage, scope, or user
138
- confirmation.
139
-
140
- If the current CLI provides detail or pagination commands, follow them before
141
- judging. Do not discover extra candidates by searching files yourself.
142
-
143
- ### Step 2 — Judge Support
144
-
145
- Compare the reader-facing claim against cited source evidence:
146
-
147
- - Every sentence must be supported by at least one cited ref.
148
- - Summary may compress, but it must not introduce a new fact.
149
- - Summary must stay faithful to source terms, numbers, code literals, product
150
- names, and relationship direction.
151
- - Compile actions do not carry reader-facing `content`. If the section body can
152
- mirror source text, omit `content` and let the CLI materialize it verbatim.
153
- If it cannot mirror one confirmed evidence boundary, split or return to align.
154
-
155
- Classify as `supported`, `weak`, or `unsupported`, then repair using the route in
156
- the vocabulary table.
157
-
158
- ### Step 3 — Judge Relation To Existing Or Planned Knowledge
159
-
160
- Use only candidates surfaced by the current CLI view. Do not run workspace-wide
161
- searches.
162
-
163
- - Same claim already covered -> skip the duplicate action or update through the
164
- current compile schema if it explicitly supports that operation.
165
- - Related but distinct source-backed claim -> keep it separate.
166
- - Replacement or contradiction -> ask the user or return to structure/review;
167
- do not silently overwrite approved knowledge, and do not turn replacement into
168
- a same-section edit.
169
- - Missing node, wrong ownership, or wrong relationship -> return to prose align.
170
-
171
- ### Step 4 — Ask The User Only When Needed
172
-
173
- Ask a user question when business meaning, conflict resolution, weak support, or
174
- no-write scope cannot be decided from evidence. The question must name the
175
- business choice, not internal source-ref ids.
176
-
177
- After the user answers, express the answer through the current surface:
178
-
179
- - lifecycle confirmation for structure;
180
- - a repaired compile action;
181
- - an `unresolved[]` item;
182
- - a skipped action with an explicit source-backed reason.
183
-
184
- ### Step 5 — Self-verify
185
-
186
- - [ ] Only current phase commands and schemas were used.
187
- - [ ] Only fields accepted by the current schema view were emitted.
188
- - [ ] Every kept claim is supported by current source refs.
189
- - [ ] Every no-write outcome has an explicit reason or user confirmation when
190
- the evidence was otherwise citation-eligible.
191
- - [ ] Structure defects return to prose align instead of being hidden in compile.
192
- - [ ] Apply/approval remains in the review gate.
193
-
194
- </procedures>