@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
@@ -0,0 +1,48 @@
1
+ ---
2
+ id: procedure.source-boundary
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Source boundary
8
+
9
+ A source boundary is a user decision about which repositories, modules, or
10
+ documents may become approved knowledge. It affects extraction scope,
11
+ provenance, output paths, and freshness checks.
12
+
13
+ Do not infer this boundary from the current directory, monorepo layout, package
14
+ names, or Git remotes. Explain the decision in the user's language, obtain the
15
+ specific paths or documents, then use the Context source schema and conditional
16
+ registration command selected by the route. The command uses `--input -`; after
17
+ the current conversation contains the required confirmation, send one YAML or
18
+ JSON payload matching the selected schema to its standard input. Do not run the
19
+ command before confirmation and do not replace it with a command remembered
20
+ from another route.
21
+
22
+ Context source identity has two parts:
23
+
24
+ - a calendar date identifies one capture batch and directory;
25
+ - a module identifies one concrete repository, local document boundary, or
26
+ remote document inside that batch.
27
+
28
+ Several modules may share one date. Do not invent date suffixes to separate
29
+ them. A date-only inspection addresses the batch; `<date>/<module>` addresses
30
+ one source. Register a confirmed multi-source request as one serial batch
31
+ mutation instead of running registry writes in parallel.
32
+
33
+ To retire a registered source, first run `context source remove <source-id>
34
+ --format json`. This is a read-only preview that lists every project, candidate,
35
+ or approved-knowledge reference. Only after those references are intentionally
36
+ resolved may the route use `--yes`; the CLI never silently deletes referenced
37
+ knowledge or another source's materialized files. Execute the exact
38
+ digest-bound command returned by the preview. For a shared document batch, the
39
+ manifest entry is the ownership boundary: removal deletes only that entry and
40
+ its explicitly listed files/assets. An uncaptured module has no manifest entry,
41
+ so removal is registry-only; the shared date directory is never inferred as
42
+ module-owned.
43
+
44
+ Repository readiness checks are mechanical and may run after the boundary is
45
+ registered. Clone, fetch, checkout, install, build, test, and other external
46
+ repository operations need separate authority. File and remote-document
47
+ registration records metadata only; reading their bodies requires source-read
48
+ permission for the exact pending modules.
@@ -1,4 +1,8 @@
1
1
  ---
2
+ id: procedure.source-capture-detailed
3
+ kind: procedure
4
+ media-type: text/markdown
5
+ context_resource: procedures/source-capture-detailed
2
6
  name: capture-source
3
7
  description: >
4
8
  Capture local Markdown or Lark/Feishu document sources through registered
@@ -22,8 +26,9 @@ registration plus the declared capture phase flow:
22
26
 
23
27
  Use only commands surfaced by the current status output or capture phase.
24
28
  For a user-confirmed multi-document batch, `context status --format json`
25
- returns every uncaptured module in `routing.command_plan`. Run the complete
26
- list in order; a successful module is omitted from the next status result.
29
+ selects the next uncaptured module in `workflow.current.commands`. Execute the
30
+ returned command, reevaluate, and continue until the route leaves capture; a
31
+ successful module is omitted from the next status result.
27
32
  When the user explicitly asks to capture, ingest, fetch, read, or include exact
28
33
  file/Lark paths or URLs, that request is the read permission for those sources;
29
34
  do not repeat the question after registration. A mere mention, possible-source
@@ -41,10 +46,37 @@ it to finish and retry rather than editing registry files.
41
46
 
42
47
  Capture is entirely CLI-driven — your role is to register the right source,
43
48
  declare the matching capture phase, run the current `context run capture:*`
44
- command, and relay its output. Never hand-write captured source snapshots: the
49
+ command, and preserve its machine fields while summarizing the outcome in the
50
+ user's language. Never hand-write captured source snapshots: the
45
51
  CLI owns normalisation (NFC, BOM strip, line endings) and the `content_hash`
46
52
  contract, so any manual edit breaks idempotency.
47
53
 
54
+ Lark capture obtains the structured XML representation and produces two
55
+ separate artifacts: XML audit evidence and a deterministic readable Markdown
56
+ projection. Do not treat raw XML as Markdown and do not rewrite it yourself.
57
+ The CLI also materializes supported embedded resources and returns a closed
58
+ `resource_materialization` report. Required images, attachments, Sheets, Bases,
59
+ whiteboards, diagrams, and synced blocks must be materialized before downstream
60
+ Review. Polls and navigation references remain explicit non-interactive
61
+ projections; video is reference-only unless the project SDK opts into bundling.
62
+ If the remote API explicitly confirms that a referenced whiteboard or diagram
63
+ no longer exists, preserve the unresolved placeholder and the structured
64
+ `document.resource.source-missing` warning, then continue through the Route.
65
+ This is an audited source-side deletion, not successful materialization. Access,
66
+ network, parameter, and unknown resource failures still block downstream work.
67
+ Do not manually download resources or patch links. Approved resources move to
68
+ `knowledge/assets/`, and package build projects selected resources to
69
+ `others/assets/`.
70
+ Inspect `evidence_status` and `projection_status` separately. An evidence error
71
+ means the source body, external content, or a stable resource locator could not
72
+ be preserved, so the workflow must not proceed to Align, Compile, or Review.
73
+ A projection warning or `generic` status means the original XML is preserved
74
+ and a deterministic non-interactive Markdown fallback was emitted; report the
75
+ diagnostic, but continue through the Route. The CLI, not the plugin, parses the
76
+ document. The plugin only displays the structured counts and diagnostics
77
+ returned by the current source resource. Do not patch the CLI or edit snapshots
78
+ to add a renderer from a user workspace.
79
+
48
80
  ### Code capture diagnostics
49
81
 
50
82
  Do not run hand-written dependency preflight commands before code extraction or
@@ -98,8 +130,8 @@ Before choosing a local Markdown capture route, honor the surrounding task conte
98
130
  rerun the same declared capture phase. The CLI appends a new snapshot only
99
131
  when content changes and never overwrites prior snapshots.
100
132
  - Code package extraction is not document capture. Route code source selection
101
- through `skill-source-scope` extraction preview and the declared extract
102
- phase. Do not invent a document capture path for code.
133
+ through the current code-extraction Route, its selected procedure, and the
134
+ declared extract phase. Do not invent a document capture path for code.
103
135
  - Conversation notes, decisions, and revision intents are not document capture
104
136
  sources in the current workflow unless the CLI status or project-specific
105
137
  phase exposes an explicit note source contract. If absent, record the user
@@ -112,22 +144,25 @@ registration; do not read file bodies before capture permission is clear.
112
144
 
113
145
  ### Output Handling
114
146
 
115
- Report the CLI output verbatim. If the CLI reports `N sources changed`, suggest the right next step:
147
+ Preserve commands, reason codes, ids, and diagnostics exactly; summarize
148
+ successful capture results for the user instead of dumping raw JSON. After any
149
+ capture result:
116
150
 
117
- - Run `context status --format json` and use its `state`, `routing`, and
118
- `command_plan`; if status returns `needs-capture-phase`, first perform the
119
- exact `routing.configuration` edit and rerun status.
120
- - While status remains `needs-capture`, execute every returned capture command
121
- for the already confirmed batch before asking another naming, collection, or
151
+ - Run `context status --format json` and treat `workflow.current` as the
152
+ current-step authority; if the route returns `configuration`, perform only
153
+ that declared project edit and rerun status.
154
+ - If `workflow.current.commands` contains another capture command for the
155
+ confirmed batch, execute it before asking another naming, collection, or
122
156
  read-permission question.
123
- - If status reports `captured-ready-to-investigate`, suggest the returned
124
- `context run align:<type>:<source>:<collection> --view read-plan --format json`
125
- command and hand off to `skill-prose-align`.
126
- - If status reports `needs-structure` or `structure-ready`, follow the returned
127
- align/compile command instead of naming a generic slash command.
128
- - If status reports `compile-ready-for-review`, route to the review gate.
129
- - If the source was code-only and status reports pending code projection,
130
- follow the CLI-owned extract/compile route returned by status.
157
+ - If the current Route selects align, compile, Review, or code extraction,
158
+ follow only that Route's commands and required resources. Do not branch on
159
+ deprecated top-level `needs-*` status names.
160
+ - If `workflow.current` is a Gate, use its `inspection_action` and selected
161
+ dialogue resource before requesting a decision. Read an Inspection Action's
162
+ nested Skill or Schema only when performing that inspection. After explicit
163
+ confirmation, use the `resolution_action` command and load only that Action's
164
+ nested Skill or Schema. These conditional resources are intentionally absent
165
+ from the Route's ordinary `resources.required`.
131
166
 
132
167
  Never suggest prose compile or hand-built document knowledge for a code-only
133
168
  source. Code sources become active knowledge only through the declared
@@ -0,0 +1,31 @@
1
+ ---
2
+ id: procedure.verify-and-repair
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Verify and repair
8
+
9
+ Verification failures are grouped by root cause. Read the current diagnostic
10
+ resource before changing anything.
11
+
12
+ If approved Markdown is valid and only the deterministic structure projection
13
+ is stale, the legal repair is `context close --format json`. Otherwise, repair
14
+ the source-bound candidate or project declaration named by the root diagnostic,
15
+ then run verification again.
16
+
17
+ When every blocking finding is an approved document `source_ref` drift or an
18
+ unresolved required-resource placeholder, and each affected source already has
19
+ a declared pending structure target, the current prose align/compile round is
20
+ the repair path. Continue that Route before running verification again. This
21
+ exception does not apply to missing sources, malformed approved knowledge,
22
+ unrelated verification errors, or findings without a matching pending target.
23
+
24
+ When a complete replacement candidate batch is ready for Review, stable prose
25
+ candidate ids may intentionally match their currently approved pages. Review
26
+ that batch before deterministic close and final verification; the pending
27
+ replacement is not an approved-identity conflict.
28
+
29
+ Do not delete candidates, approved pages, snapshots, or structure slots to make
30
+ verification pass. Derived diagnostics should not be handled as independent
31
+ root failures.
@@ -1,4 +1,17 @@
1
+ ---
2
+ id: context.semantic.align.candidate-resolution
3
+ kind: procedure
4
+ media-type: text/markdown
5
+ applies-to:
6
+ - duplicate
7
+ - conflict
8
+ - stable_id
9
+ - path
10
+ - unresolved
11
+ ---
12
+
1
13
  # Candidate Resolution Rules
14
+ <!-- Context workflow semantic resource. -->
2
15
 
3
16
  Use these rules after reading the current align evidence views and before
4
17
  authoring `context.structure.v1`. They define how current anomaly diagnostics
@@ -32,8 +45,10 @@ Known anomaly kinds:
32
45
  Use stable `node_ref`, `view_ref`, and `section_ref` values from the current
33
46
  `context.structure.v1` payload for in-payload references. A NodeRef should be
34
47
  safe, lower-case, and path-shaped, such as `entity/rspack` or
35
- `domain/build-tooling`. `slug` and `path` are derived fields in the current
36
- flow; do not invent alternate reference aliases.
48
+ `domain/build-tooling`. `slug` is the required stable filename choice for a
49
+ View. `path` is derived from collection, optional containment, and slug; omit
50
+ it or use the exact CLI-derived value. Do not invent alternate reference
51
+ aliases.
37
52
 
38
53
  When an edge or section points at knowledge:
39
54
 
@@ -1,4 +1,15 @@
1
+ ---
2
+ id: context.semantic.align.density-profile
3
+ kind: procedure
4
+ media-type: text/markdown
5
+ applies-to:
6
+ - coverage
7
+ - reading_density
8
+ - structure
9
+ ---
10
+
1
11
  # Evidence Density Selection
12
+ <!-- Context workflow semantic resource. -->
2
13
 
3
14
  Use density as a private reading and section-planning strategy. It is not a
4
15
  separate payload, not a quality score, and not a workflow stage. Persist only
@@ -1,4 +1,17 @@
1
+ ---
2
+ id: context.semantic.align.align-gates
3
+ kind: procedure
4
+ media-type: text/markdown
5
+ applies-to:
6
+ - node_type
7
+ - domain
8
+ - action
9
+ - edges
10
+ - tags
11
+ ---
12
+
1
13
  # Node Classification Gates
14
+ <!-- Context workflow semantic resource. -->
2
15
 
3
16
  Use these gates before every structure draft and before authoring the align
4
17
  payload described by the current schema view.
@@ -1,4 +1,15 @@
1
1
  ---
2
+ context_resource: semantic/align/structure-planning
3
+ id: context.semantic.align.structure-planning
4
+ kind: procedure
5
+ media-type: text/markdown
6
+ applies-to:
7
+ - node_type
8
+ - title
9
+ - tags
10
+ - ownership
11
+ - edges
12
+ - structure
2
13
  name: structure-planning
3
14
  description: "Internal procedure for the current align gate. Reads CLI-guided align evidence, applies semantic Node classification gates, and emits context.structure.v1 payloads for CLI validation/stage."
4
15
  ---
@@ -7,7 +18,7 @@ description: "Internal procedure for the current align gate. Reads CLI-guided al
7
18
 
8
19
  ## TL;DR
9
20
 
10
- Run `context run align:<type>:<source>:<collection> --view read-plan --format json`, follow the top-level `next_action.command` to read the CLI-selected evidence path, produce a `context.structure.v1` structure payload, and continue following top-level `next_action`. The CLI owns route, validation, repair commands, and stage guards; this skill owns only semantic classification and source-bound structure judgment.
21
+ Run `context run align:<type>:<source>:<collection> --view read-plan --format json`, follow the top-level `next_action.command` to read the CLI-selected evidence path, produce a `context.structure.v1` structure payload, and continue following top-level `next_action`. The CLI owns route, validation, repair commands, and stage guards; the Agent owns only semantic classification and source-bound structure judgment.
11
22
 
12
23
  <reference>
13
24
 
@@ -23,9 +34,9 @@ Run `context run align:<type>:<source>:<collection> --view read-plan --format js
23
34
  - Schema names and enum values come from
24
35
  `context run align:<type>:<source>:<collection> --view schema --format json`. Use
25
36
  that schema as the authoring contract for `context.structure.v1`.
26
- - Existing approved knowledge and `knowledge/structure.yaml` are the lookup
27
- registry exposed through current CLI/status/query views. Do not read
28
- `knowledge/**` or create a separate registry file.
37
+ - Existing approved knowledge is the lookup registry exposed by the current
38
+ align `existing-knowledge` View. Do not read `knowledge/**`, guess a top-level
39
+ query command, or create a separate registry file.
29
40
  - Code projection Nodes are reusable knowledge handles. When document evidence belongs on a code symbol, reuse the code slug instead of creating a parallel document Node.
30
41
  - Validation diagnostics are the mechanical structure ownership source of
31
42
  truth. Non-content spans such as navigation references, placeholders, front
@@ -44,7 +55,10 @@ Run `context run align:<type>:<source>:<collection> --view read-plan --format js
44
55
  placeholder/relation source is skipped entirely, leave its relation clues in
45
56
  `unresolved[]` only when they still matter; otherwise omit them.
46
57
  - `views[]` and diagnostics distinguish citable evidence from supporting context. Do not promote supporting/context-only material into cited Sections unless a later ownership correction makes it citation-eligible.
47
- - Keep cache-friendly prompt order: fixed protocol/schema first, existing knowledge lookup second, source evidence views third, current semantic payload last. Preserve CLI JSON order and do not add timestamps, random ids, scratch paths, or host paths to generated payloads.
58
+ - Keep cache-friendly prompt order: fixed protocol/schema first, source evidence
59
+ views second, targeted existing-knowledge results third, and the current
60
+ semantic payload last. Preserve CLI JSON order and do not add timestamps,
61
+ random ids, scratch paths, or host paths to generated payloads.
48
62
  - Structure digests and snapshot hashes are stale guards. Follow returned
49
63
  `next_action.command` and do not invent digest values.
50
64
  - Node type, tag, fake-Entity, `domain`, and `action` gates are in `structure-planning/references/gates.md`.
@@ -80,8 +94,9 @@ or `next_command`.
80
94
 
81
95
  `read-plan` is the navigation surface. It chooses whether the next evidence read
82
96
  is `source-index`, `span-detail`, `span-text`, or another current evidence view.
83
- Read those views and then author the requested
84
- `context.structure.v1` payload yourself. Never pipe evidence text into validate.
97
+ Read those views and then author the requested `context.structure.v1` payload
98
+ yourself after completing the targeted lookup in Step 3. Never pipe evidence
99
+ text into validate.
85
100
 
86
101
  If an evidence view is truncated, `page.has_more: true`, or the CLI returns a
87
102
  `next_command`, run that command before authoring.
@@ -96,7 +111,19 @@ is explicitly needed, otherwise return to the CLI-designated navigation view.
96
111
 
97
112
  ### Step 3 — Reuse Existing Knowledge
98
113
 
99
- Query existing knowledge for reusable names before proposing new term/service/system/action Nodes. Exact title/slug/alias hits should usually become references to the existing Node, not duplicate candidates.
114
+ After source evidence identifies a candidate title or stable ref, run:
115
+
116
+ ```bash
117
+ context run align:<type>:<source>:<collection> --view existing-knowledge --query <title-or-stable-ref> --format json
118
+ ```
119
+
120
+ Use the returned pagination command when present. Exact title, NodeRef, or
121
+ ViewRef hits should usually reuse the existing Node instead of creating a
122
+ duplicate candidate. The lookup returns only the best title/NodeRef/ViewRef
123
+ identity tier. Shared tag matches are summarized separately and never require
124
+ walking the related subgraph merely to determine whether a root identity
125
+ exists. The lookup is deterministic identity discovery; the Agent still
126
+ decides whether the source evidence describes the same concept.
100
127
 
101
128
  When a code projection Node already represents the object, reuse its slug for prose evidence and plan only prose-owned Sections for the current source evidence.
102
129
 
@@ -196,6 +223,11 @@ snapshot hash. Section identities are part of the structure gate: choose stable
196
223
  section ids such as `overview`, `behavior`, `constraints`, or a source-backed
197
224
  domain-specific name when the evidence supports it.
198
225
 
226
+ For an independent collection entry, omit `containment`; the CLI derives
227
+ `<collection>/<slug>.md`. Set `containment` only when the confirmed structure
228
+ intentionally places the View under a parent path. Do not add a source/module
229
+ wrapper merely to make every page use the same directory depth.
230
+
199
231
  Use only CLI-provided `source_refs[]` for section and edge evidence. Continuity
200
232
  is a per-Section constraint, not a per-View constraint: one View may contain
201
233
  many independently retrievable Sections, each with its own continuous mirror.
@@ -218,7 +250,8 @@ otherwise repair source refs from CLI evidence views or move unsupported
218
250
  material to `unresolved[]`.
219
251
 
220
252
  For pure suggested-split repairs, prefer the CLI repair view before hand-editing:
221
- `context run align:<type>:<source>:<collection> --repair suggested-splits --input <structure.yaml> --format json`.
253
+ Deterministic source-boundary repairs are applied internally by validate/stage
254
+ and are not a separate Agent command.
222
255
  It splits non-contiguous Section mirrors and can expand a broad cross-heading
223
256
  Section into Markdown structural groups within the same View. Apply the
224
257
  non-blocking repair hint when the groups should be independently retrievable;
@@ -252,14 +285,31 @@ mention without a dependency predicate. `edges[].source_refs[]` must include the
252
285
  source ref that states the dependency; if the relationship matters but evidence
253
286
  is missing, leave the edge unresolved instead of guessing.
254
287
 
255
- Prefer the strongest source-backed `section_kind` using the current schema's `section_kind_priority` and `section_kind_triggers`; avoid planning an entire dense source as `description` when the evidence clearly contains fenced examples, comparison tables, Q&A, decisions, specs, warnings, or principles. Use `example` for fenced command/config/code or literal sample blocks, not ordinary scenario prose. Use `incident` only for dated or timestamped failure evidence with impact scope plus root cause, mitigation, or handling record. Use `decision` only when the source surfaces two or more alternatives or options plus the chosen path and rationale. Treat kind precision as a drafting quality preference, not a reason to block an otherwise source-backed write. Keep only raw-backed semantic decisions in the payload; leave mechanical repair and patch routing to CLI diagnostics.
288
+ Prefer the strongest source-backed `section_kind` using the current schema's
289
+ `section_kind_priority` and the semantic rules below; avoid planning an entire
290
+ dense source as `description` when the evidence clearly contains fenced
291
+ examples, comparison tables, Q&A, decisions, specs, warnings, or principles.
292
+ Use `example` for fenced command/config/code or literal sample blocks, not
293
+ ordinary scenario prose. Use `comparison` for two or more subjects compared
294
+ across two or more dimensions. Use `faq` for a question-and-answer pair. Use
295
+ `incident` only for dated or timestamped failure evidence with impact scope
296
+ plus root cause, mitigation, or handling record. Use `changelog` for a
297
+ versioned or dated change record. Use `decision` only when the source surfaces
298
+ two or more alternatives or options plus the chosen path and rationale. Use
299
+ `spec` for a verifiable rule, threshold, requirement, constraint, or checkable
300
+ target; `warning` for an explicit caveat, risk, hazard, or limitation;
301
+ `principle` for a stable invariant, design rule, or core mechanism without a
302
+ check method; and `description` only as the narrative fallback. Treat kind
303
+ precision as a drafting quality preference, not a reason to block an otherwise
304
+ source-backed write. Keep only raw-backed semantic decisions in the payload;
305
+ leave mechanical repair and patch routing to CLI diagnostics.
256
306
 
257
307
  There is no parallel candidate-body authoring path. Emit only the
258
308
  `context.structure.v1` payload accepted by the current schema view.
259
309
 
260
310
  ### Step 6 — Validate And Submit
261
311
 
262
- Before staging, run `context run align:<type>:<source>:<collection> --validate --input - --format json` with the `context.structure.v1` payload. If validate returns `repair_confirmation_blockers`, follow its repair route and rerun validate without asking for preliminary approval. `--repair suggested-splits` handles non-contiguous source mirror Sections. For oversized Views, apply the returned child-View and contains-edge suggestions while classifying child Nodes from evidence. Resolve other blockers from evidence; ask the user only when evidence supports multiple incompatible semantic choices, and state that this is not final review. Stage only after `confirmation_ready=true`. The stage result opens the final HTML report and is the human review gate: show the structure to the user through `structure_report.file_url`, `structure_report.absolute_path`, and the compact summary before asking for confirmation. Only write `lifecycle.state: confirmed` only after explicit confirmation; then run `context run align:<type>:<source>:<collection> --confirm --format json` or pass an explicit file with `--confirm --input <structure.yaml> --format json`.
312
+ Before staging, run `context run align:<type>:<source>:<collection> --validate --input - --format json` with the `context.structure.v1` payload. The CLI applies deterministic boundary repairs internally and returns only remaining blockers. For oversized Views, apply the returned child-View and contains-edge suggestions while classifying child Nodes from evidence. Resolve other blockers from evidence; ask the user only when evidence supports multiple incompatible semantic choices. Stage only after validation state is `ready`. The stage result opens the final HTML report for the Route-selected structure-confirmation gate. Execute the revision-bound confirmation command returned by `workflow.current`; managed session authority may resolve that gate without another question.
263
313
 
264
314
  After stage succeeds, do not rerun the same write command to confirm success.
265
315
  Use `context status --format json` or the returned result for read-only
@@ -277,6 +327,6 @@ editing CLI-managed files.
277
327
  - [ ] Node classification used the semantic gates in `structure-planning/references/gates.md`. If not, return to **Step 4**.
278
328
  - [ ] URL/reference ownership followed CLI diagnostics, not static prompt rules. If not, return to **Step 5**.
279
329
  - [ ] The requested align payload passed `context run align:<type>:<source>:<collection> --validate --input - --format json` before stage. If not, return to **Step 6**.
280
- - [ ] No `sources/`, `unapproved/`, `knowledge/`, `dist/`, `.tmp`, host tool-results, or CLI-managed files were read or written with generic tools. If violated, restart from **Step 1**.
330
+ - [ ] No `sources/`, `knowledge/`, `dist/`, `.tmp`, host tool-results, or CLI-managed files were read or written with generic tools. If violated, restart from **Step 1**.
281
331
 
282
332
  </procedures>
@@ -0,0 +1,31 @@
1
+ ---
2
+ context_resource: semantic/compile/index
3
+ id: context.semantic.compile.index
4
+ kind: procedure
5
+ media-type: text/markdown
6
+ applies-to:
7
+ - diagnostic-routing
8
+ - evidence-repair
9
+ name: compile-reference-index
10
+ description: "Optional index for non-mechanical structure and evidence diagnostics; normal compile does not require it."
11
+ ---
12
+
13
+ # Compile semantic reference index
14
+
15
+ Normal source-bound compile is deterministic and does not require these
16
+ references. Read this index only when a structure or evidence diagnostic asks
17
+ for a non-mechanical decision, then open only the matching procedure:
18
+
19
+ - [Compile action contract](compile-actions.md)
20
+ - [Action and domain gates](action-domain-gates.md)
21
+ - [Notes and caveats](notes.md)
22
+ - [Refresh and update](refresh-and-update.md)
23
+ - [Structural challenges](structural-challenges.md)
24
+ - [Compile judgment](compile-judgment.md)
25
+ - [Semantic judgment](semantic-judgment.md)
26
+ - [Disposition semantics](disposition-semantics.md)
27
+ - [Temporal evidence](temporal-and-evidence.md)
28
+ - [Leakage and ownership](leakage-and-ownership.md)
29
+ - [Scope review and omission](scope-review-and-omit.md)
30
+ - [User confirmation](user-confirmation.md)
31
+ - [Close gate](close-gate.md)
@@ -0,0 +1,6 @@
1
+ schema: agent-graph.resource.v1
2
+ id: context.package-current
3
+ kind: context-view
4
+ mediaType: text/markdown
5
+ description: Current package declarations, freshness, and output counts.
6
+ materializer: actions/materialize-context-view.yaml
@@ -0,0 +1,6 @@
1
+ schema: agent-graph.resource.v1
2
+ id: context.review-current
3
+ kind: context-view
4
+ mediaType: text/markdown
5
+ description: Current complete review scope and candidate-set identity.
6
+ materializer: actions/materialize-context-view.yaml
@@ -0,0 +1,6 @@
1
+ schema: agent-graph.resource.v1
2
+ id: context.source-boundary
3
+ kind: context-view
4
+ mediaType: text/markdown
5
+ description: Stable registered source identities and boundaries without lifecycle progress.
6
+ materializer: actions/materialize-context-view.yaml
@@ -0,0 +1,6 @@
1
+ schema: agent-graph.resource.v1
2
+ id: context.source-current
3
+ kind: context-view
4
+ mediaType: text/markdown
5
+ description: Current repository and document source readiness and pending capture or extraction targets.
6
+ materializer: actions/materialize-context-view.yaml
@@ -0,0 +1,6 @@
1
+ schema: agent-graph.resource.v1
2
+ id: context.structure-current
3
+ kind: context-view
4
+ mediaType: text/markdown
5
+ description: Current multi-document structure slots, declarations, and compile batch.
6
+ materializer: actions/materialize-context-view.yaml
@@ -0,0 +1,6 @@
1
+ schema: agent-graph.resource.v1
2
+ id: context.verification-current
3
+ kind: context-view
4
+ mediaType: text/markdown
5
+ description: Current verification, evidence, and deterministic close diagnostics.
6
+ materializer: actions/materialize-context-view.yaml
@@ -0,0 +1,6 @@
1
+ schema: agent-graph.resource.v1
2
+ id: context.workspace-current
3
+ kind: context-view
4
+ mediaType: text/markdown
5
+ description: Current workspace counts, route, diagnostics, and declared lifecycle coverage.
6
+ materializer: actions/materialize-context-view.yaml
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "context.evidence-maintenance.v1",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": ["schema", "decisions"],
7
+ "properties": {
8
+ "schema": {
9
+ "const": "context.evidence-maintenance.v1"
10
+ },
11
+ "decisions": {
12
+ "type": "array",
13
+ "minItems": 1,
14
+ "items": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["view_ref", "action"],
18
+ "properties": {
19
+ "view_ref": {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ "action": {
24
+ "enum": ["re-pin", "deprecate", "keep-orphaned"]
25
+ }
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "context.prose.structure-batch.v1",
4
+ "title": "Context prose structure batch",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema", "items"],
8
+ "properties": {
9
+ "schema": {
10
+ "const": "context.prose.structure-batch.v1"
11
+ },
12
+ "items": {
13
+ "type": "array",
14
+ "minItems": 1,
15
+ "maxItems": 100,
16
+ "items": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": ["phase_id", "input"],
20
+ "properties": {
21
+ "phase_id": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "description": "One declared phase.align.prose id from the current pending structure targets."
25
+ },
26
+ "input": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "description": "Project-relative or absolute YAML/JSON context.structure.v1 payload path for this target."
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "context.repository-source-recovery.v1",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": ["schema", "repositories"],
7
+ "properties": {
8
+ "schema": {
9
+ "const": "context.repository-source-recovery.v1"
10
+ },
11
+ "repositories": {
12
+ "type": "array",
13
+ "minItems": 1,
14
+ "items": {
15
+ "oneOf": [
16
+ {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": ["source", "mode", "path"],
20
+ "properties": {
21
+ "source": { "type": "string", "minLength": 1 },
22
+ "mode": { "const": "local" },
23
+ "path": { "type": "string", "minLength": 1 }
24
+ }
25
+ },
26
+ {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["source", "mode"],
30
+ "properties": {
31
+ "source": { "type": "string", "minLength": 1 },
32
+ "mode": { "const": "clone" },
33
+ "path": { "type": "string", "minLength": 1 }
34
+ }
35
+ }
36
+ ]
37
+ }
38
+ }
39
+ }
40
+ }