@c4a/context-cli 0.5.41-beta.7 → 0.6.0-alpha.6

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 (263) hide show
  1. package/README.md +115 -123
  2. package/babel.cjs +257 -0
  3. package/cli.js +64438 -96584
  4. package/docs/quickstart.md +85 -0
  5. package/package.json +3 -1
  6. package/plugin/.claude-plugin/plugin.json.template +1 -1
  7. package/plugin/.codex-plugin/plugin.json.template +5 -5
  8. package/plugin/.cursor-plugin/plugin.json.template +1 -1
  9. package/plugin/README.md +105 -86
  10. package/plugin/README_CN.md +92 -85
  11. package/plugin/commands/continue.md +34 -0
  12. package/plugin/commands/init.md +13 -130
  13. package/plugin/skills/skill-continue-workflow/SKILL.md +172 -0
  14. package/plugin/skills/skill-init-workspace/SKILL.md +74 -0
  15. package/plugin/skills/skill-package-output/SKILL.md +167 -0
  16. package/plugin/skills/skill-prose-align/SKILL.md +296 -0
  17. package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +91 -0
  18. package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +30 -0
  19. package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +235 -0
  20. package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning.md +243 -0
  21. package/plugin/skills/skill-prose-compile/SKILL.md +265 -0
  22. package/plugin/skills/skill-prose-compile/references/internal-procedures/close-gate.md +132 -0
  23. package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +52 -0
  24. package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +48 -0
  25. package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +85 -0
  26. package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +73 -0
  27. package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +413 -0
  28. package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +123 -0
  29. package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +81 -0
  30. package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +55 -0
  31. package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +93 -0
  32. package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +79 -0
  33. package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +111 -0
  34. package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +194 -0
  35. package/plugin/skills/skill-review-gate/SKILL.md +98 -0
  36. package/plugin/skills/skill-source-scope/SKILL.md +406 -0
  37. package/plugin/skills/skill-source-scope/references/capture-source.md +180 -0
  38. package/plugins/.agents/plugins/marketplace.json +20 -0
  39. package/plugins/.claude-plugin/marketplace.json +13 -0
  40. package/plugins/.cursor-plugin/marketplace.json +17 -0
  41. package/plugins/README.md +150 -0
  42. package/plugins/README_CN.md +136 -0
  43. package/plugins/VERSION +1 -0
  44. package/plugins/assets/icon.svg +3 -0
  45. package/plugins/assets/logo.svg +3 -0
  46. package/plugins/assets/workflow-en.png +0 -0
  47. package/plugins/assets/workflow.png +0 -0
  48. package/plugins/claude/.claude-plugin/plugin.json +16 -0
  49. package/plugins/claude/.generated +1 -0
  50. package/plugins/claude/CLAUDE.md +5 -0
  51. package/plugins/claude/README.md +5 -0
  52. package/plugins/claude/commands/continue.md +34 -0
  53. package/plugins/claude/commands/init.md +21 -0
  54. package/plugins/claude/skills/skill-continue-workflow/SKILL.md +172 -0
  55. package/plugins/claude/skills/skill-init-workspace/SKILL.md +74 -0
  56. package/plugins/claude/skills/skill-package-output/SKILL.md +167 -0
  57. package/plugins/claude/skills/skill-prose-align/SKILL.md +296 -0
  58. package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +91 -0
  59. package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +30 -0
  60. package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +235 -0
  61. package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning.md +243 -0
  62. package/plugins/claude/skills/skill-prose-compile/SKILL.md +265 -0
  63. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/close-gate.md +132 -0
  64. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +52 -0
  65. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +48 -0
  66. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +85 -0
  67. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +73 -0
  68. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +413 -0
  69. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +123 -0
  70. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +81 -0
  71. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +55 -0
  72. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +93 -0
  73. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +79 -0
  74. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +111 -0
  75. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +194 -0
  76. package/plugins/claude/skills/skill-review-gate/SKILL.md +98 -0
  77. package/plugins/claude/skills/skill-source-scope/SKILL.md +406 -0
  78. package/plugins/claude/skills/skill-source-scope/references/capture-source.md +180 -0
  79. package/plugins/codex/.codex-plugin/plugin.json +38 -0
  80. package/plugins/codex/.generated +1 -0
  81. package/plugins/codex/AGENTS.md +5 -0
  82. package/plugins/codex/README.md +5 -0
  83. package/plugins/codex/assets/icon.svg +3 -0
  84. package/plugins/codex/assets/logo.svg +3 -0
  85. package/plugins/codex/assets/workflow-en.png +0 -0
  86. package/plugins/codex/assets/workflow.png +0 -0
  87. package/plugins/codex/skills/continue/SKILL.md +47 -0
  88. package/plugins/codex/skills/continue/references/internal-procedures/skill-continue-workflow.md +172 -0
  89. package/plugins/codex/skills/continue/references/internal-procedures/skill-init-workspace.md +74 -0
  90. package/plugins/codex/skills/continue/references/internal-procedures/skill-package-output.md +167 -0
  91. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +91 -0
  92. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +30 -0
  93. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +235 -0
  94. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +243 -0
  95. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align.md +296 -0
  96. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +132 -0
  97. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +52 -0
  98. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +48 -0
  99. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +85 -0
  100. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +73 -0
  101. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +413 -0
  102. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +123 -0
  103. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +81 -0
  104. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +55 -0
  105. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +93 -0
  106. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +79 -0
  107. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +111 -0
  108. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +194 -0
  109. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile.md +265 -0
  110. package/plugins/codex/skills/continue/references/internal-procedures/skill-review-gate.md +98 -0
  111. package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope/references/capture-source.md +180 -0
  112. package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +406 -0
  113. package/plugins/codex/skills/init/SKILL.md +34 -0
  114. package/plugins/codex/skills/init/references/internal-procedures/skill-continue-workflow.md +172 -0
  115. package/plugins/codex/skills/init/references/internal-procedures/skill-init-workspace.md +74 -0
  116. package/plugins/codex/skills/init/references/internal-procedures/skill-package-output.md +167 -0
  117. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +91 -0
  118. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +30 -0
  119. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +235 -0
  120. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +243 -0
  121. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align.md +296 -0
  122. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +132 -0
  123. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +52 -0
  124. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +48 -0
  125. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +85 -0
  126. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +73 -0
  127. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +413 -0
  128. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +123 -0
  129. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +81 -0
  130. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +55 -0
  131. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +93 -0
  132. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +79 -0
  133. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +111 -0
  134. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +194 -0
  135. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile.md +265 -0
  136. package/plugins/codex/skills/init/references/internal-procedures/skill-review-gate.md +98 -0
  137. package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope/references/capture-source.md +180 -0
  138. package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +406 -0
  139. package/plugins/cursor/.cursor-plugin/plugin.json +29 -0
  140. package/plugins/cursor/.generated +1 -0
  141. package/plugins/cursor/AGENTS.md +5 -0
  142. package/plugins/cursor/README.md +13 -0
  143. package/plugins/cursor/assets/icon.svg +3 -0
  144. package/plugins/cursor/assets/logo.svg +3 -0
  145. package/plugins/cursor/assets/workflow-en.png +0 -0
  146. package/plugins/cursor/assets/workflow.png +0 -0
  147. package/plugins/cursor/commands/context-continue.md +38 -0
  148. package/plugins/cursor/commands/context-init.md +25 -0
  149. package/plugins/cursor/skills/skill-continue-workflow/SKILL.md +172 -0
  150. package/plugins/cursor/skills/skill-init-workspace/SKILL.md +74 -0
  151. package/plugins/cursor/skills/skill-package-output/SKILL.md +167 -0
  152. package/plugins/cursor/skills/skill-prose-align/SKILL.md +296 -0
  153. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +91 -0
  154. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +30 -0
  155. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +235 -0
  156. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning.md +243 -0
  157. package/plugins/cursor/skills/skill-prose-compile/SKILL.md +265 -0
  158. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/close-gate.md +132 -0
  159. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +52 -0
  160. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +48 -0
  161. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +85 -0
  162. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +73 -0
  163. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +413 -0
  164. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +123 -0
  165. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +81 -0
  166. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +55 -0
  167. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +93 -0
  168. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +79 -0
  169. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +111 -0
  170. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +194 -0
  171. package/plugins/cursor/skills/skill-review-gate/SKILL.md +98 -0
  172. package/plugins/cursor/skills/skill-source-scope/SKILL.md +406 -0
  173. package/plugins/cursor/skills/skill-source-scope/references/capture-source.md +180 -0
  174. package/plugins/skills/context-continue/SKILL.md +47 -0
  175. package/plugins/skills/context-continue/references/internal-procedures/skill-continue-workflow.md +172 -0
  176. package/plugins/skills/context-continue/references/internal-procedures/skill-init-workspace.md +74 -0
  177. package/plugins/skills/context-continue/references/internal-procedures/skill-package-output.md +167 -0
  178. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +91 -0
  179. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +30 -0
  180. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +235 -0
  181. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +243 -0
  182. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align.md +296 -0
  183. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +132 -0
  184. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +52 -0
  185. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +48 -0
  186. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +85 -0
  187. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +73 -0
  188. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +413 -0
  189. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +123 -0
  190. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +81 -0
  191. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +55 -0
  192. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +93 -0
  193. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +79 -0
  194. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +111 -0
  195. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +194 -0
  196. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile.md +265 -0
  197. package/plugins/skills/context-continue/references/internal-procedures/skill-review-gate.md +98 -0
  198. package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope/references/capture-source.md +180 -0
  199. package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +406 -0
  200. package/plugins/skills/context-init/SKILL.md +34 -0
  201. package/plugins/skills/context-init/references/internal-procedures/skill-continue-workflow.md +172 -0
  202. package/plugins/skills/context-init/references/internal-procedures/skill-init-workspace.md +74 -0
  203. package/plugins/skills/context-init/references/internal-procedures/skill-package-output.md +167 -0
  204. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +91 -0
  205. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +30 -0
  206. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +235 -0
  207. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +243 -0
  208. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align.md +296 -0
  209. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +132 -0
  210. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +52 -0
  211. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +48 -0
  212. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +85 -0
  213. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +73 -0
  214. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +413 -0
  215. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +123 -0
  216. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +81 -0
  217. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +55 -0
  218. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +93 -0
  219. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +79 -0
  220. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +111 -0
  221. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +194 -0
  222. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile.md +265 -0
  223. package/plugins/skills/context-init/references/internal-procedures/skill-review-gate.md +98 -0
  224. package/plugins/skills/context-init/references/internal-procedures/skill-source-scope/references/capture-source.md +180 -0
  225. package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +406 -0
  226. package/scripts/build-plugin.ts +70 -123
  227. package/plugin/commands/align.md +0 -71
  228. package/plugin/commands/capture.md +0 -113
  229. package/plugin/commands/compile.md +0 -112
  230. package/plugin/commands/context.md +0 -36
  231. package/plugin/commands/drop.md +0 -38
  232. package/plugin/commands/extract.md +0 -18
  233. package/plugin/commands/ops.md +0 -47
  234. package/plugin/commands/purge.md +0 -22
  235. package/plugin/commands/query.md +0 -22
  236. package/plugin/commands/status.md +0 -25
  237. package/plugin/skills/skill-align-workflow/SKILL.md +0 -110
  238. package/plugin/skills/skill-align-workflow/references/candidate-resolution.md +0 -60
  239. package/plugin/skills/skill-align-workflow/references/density-profile.md +0 -16
  240. package/plugin/skills/skill-align-workflow/references/gates.md +0 -162
  241. package/plugin/skills/skill-compile-close/SKILL.md +0 -127
  242. package/plugin/skills/skill-compile-draft/SKILL.md +0 -175
  243. package/plugin/skills/skill-compile-draft/references/action-domain-gates.md +0 -34
  244. package/plugin/skills/skill-compile-draft/references/notes.md +0 -34
  245. package/plugin/skills/skill-compile-draft/references/refresh-and-update.md +0 -71
  246. package/plugin/skills/skill-compile-draft/references/structural-challenges.md +0 -76
  247. package/plugin/skills/skill-compile-judge/SKILL.md +0 -112
  248. package/plugin/skills/skill-context-query/SKILL.md +0 -236
  249. package/plugin/skills/skill-drop/SKILL.md +0 -189
  250. package/plugin/skills/skill-semantic-reconcile/SKILL.md +0 -136
  251. package/plugin/skills/skill-semantic-reconcile/references/leakage-and-ownership.md +0 -31
  252. package/plugin/skills/skill-semantic-reconcile/references/mode-semantics.md +0 -41
  253. package/plugin/skills/skill-semantic-reconcile/references/scope-review-and-omit.md +0 -60
  254. package/plugin/skills/skill-semantic-reconcile/references/temporal-and-evidence.md +0 -58
  255. package/plugin/skills/skill-semantic-reconcile/references/user-confirmation.md +0 -71
  256. package/scripts/build-aspect-runtime.ts +0 -45
  257. package/templates/aspect-runtime/aspectRunnerSdk.js +0 -776
  258. package/templates/aspects/README.md +0 -517
  259. package/templates/aspects/code/README.md +0 -48
  260. package/templates/aspects/code/aspect.yaml +0 -21
  261. package/templates/aspects/design-system/README.md +0 -26
  262. package/templates/aspects/graphql/README.md +0 -24
  263. package/templates/aspects/openapi/README.md +0 -24
@@ -0,0 +1,265 @@
1
+ ---
2
+ name: skill-prose-compile
3
+ description: >
4
+ Internal procedure invoked by the public Context continuation entry; not a user slash command.
5
+ Uses confirmed Context document structure to create source-bound draft prose
6
+ candidates through `context.compile-actions.v1`, without reading raw
7
+ snapshots directly.
8
+ tools:
9
+ - Bash
10
+ ---
11
+
12
+ # skill-prose-compile
13
+
14
+ Compile confirmed document structure into reviewable draft knowledge.
15
+
16
+ ## TL;DR
17
+
18
+ - Use this after `context status` reports `structure-ready` or
19
+ `needs-prose-compile`, or when the user explicitly asks to compile confirmed
20
+ prose structure into draft pages.
21
+ - The input is already confirmed `context.structure.v1`; do not redesign node
22
+ ownership, page paths, or relationships here. Return to prose align if those
23
+ are wrong.
24
+ - Read compile context through CLI views only: `read-plan`, `node-context`, and
25
+ `schema`. Use align evidence views only when the compile view or validation
26
+ output gives a specific source ref that needs exact text.
27
+ - Emit `context.compile-actions.v1`; the CLI mirrors source spans, derives
28
+ `content_mode`, writes review candidates, and enforces source-bound evidence.
29
+ - The `summary` field in each action is the Agent-authored behavior half only:
30
+ compact source-backed recall text for the cited section. The CLI separately
31
+ renders the reachability half from confirmed typed edges into review metadata;
32
+ do not invent edge summaries or relation fields in the action payload.
33
+ - Default to omitted `content` so the CLI mirrors the cited source span.
34
+ Do not write explicit `content`. If the evidence cannot be represented as a
35
+ faithful mirrored continuous span, split the section or return to prose align
36
+ for a confirmed structure change.
37
+ - Before choosing section kind, summary, skip/update, weak-evidence handling, or
38
+ structure repair, read the current procedure references listed by the CLI as
39
+ `semantic_reference_files`. These are the migrated compile judgment rules, not
40
+ summaries.
41
+ - Do not produce or validate compile actions from this entry file alone. If the
42
+ relevant `semantic_reference_files` have not been read in the current turn,
43
+ stop and read them first.
44
+
45
+ <reference>
46
+
47
+ ## User-Facing Gates
48
+
49
+ Use semantic labels, not SDK function names:
50
+
51
+ | Gate | Say this | Do not say this first |
52
+ |---|---|---|
53
+ | Compile context | "I will inspect the confirmed structure and each node's planned evidence before drafting sections." | `node-context`, `context.compile-actions.v1` |
54
+ | Source-bound draft | "I will mirror supported source spans into reviewable draft pages and attach summary/kind metadata." | `compileProse` |
55
+ | Non-mirror evidence | "This section cannot be compiled as-is because the evidence is not one faithful source mirror; we need to split or revise the structure." | "The agent can rewrite this automatically." |
56
+ | Structure mismatch | "This compile cannot proceed because the confirmed structure no longer matches the evidence; we need to return to structure confirmation." | Editing `knowledge/` or `unapproved/` directly |
57
+
58
+ ## Runtime Discipline
59
+
60
+ - Follow `context status`, `routing.next_commands`, compile view
61
+ `next_action`, and validation diagnostics. Treat CLI commands as the source
62
+ of truth.
63
+ - Use only the returned `next_action.command` for the next required write.
64
+ Treat `allowed_actions[]` as permission for read-only insertions; it is not a
65
+ menu of alternate write paths.
66
+ - Treat `agent_hints[]` as temporary diagnostics. If an agent hint conflicts
67
+ with a status route, compile view `next_action`, or validation result, follow
68
+ the top-level route.
69
+ - Do not use direct file tools, shell scripts, `jq`, `sed`, `cat`, `head`,
70
+ `tail`, Python, or Node.js to inspect `sources/`, `unapproved/`,
71
+ `knowledge/`, `dist/`, or CLI-managed `.tmp` as a substitute for Context
72
+ views.
73
+ - Run one write at a time. Do not parallelize compile stage, review apply,
74
+ close, or build writes.
75
+ - Compile does not get a second, looser rule set. If a rule conflicts with the
76
+ current CLI schema or diagnostics, follow the CLI and repair the payload.
77
+ - Write digest/hash flags are stale guards. Use values returned by the CLI; do
78
+ not parse stdout fragments or host tool-result files to reconstruct them.
79
+ - If a payload is too large for a heredoc, stage it under
80
+ `.tmp/agent-payloads/<run-id>/...` in the workspace root and redirect stdin
81
+ from that file. Never reuse fixed `/tmp/c4a-*` names, and never place agent
82
+ scratch payloads under CLI-managed `.tmp/context-cli/`, `sources/`,
83
+ `unapproved/`, `knowledge/`, `dist/`, review output, or package output
84
+ directories.
85
+
86
+ ## Compile Views
87
+
88
+ Recommended read order:
89
+
90
+ ```bash
91
+ context run compile:<type>:<source>:<collection> --view read-plan --format json
92
+ context run compile:<type>:<source>:<collection> --view node-context --source <view-ref> --format json
93
+ context run compile:<type>:<source>:<collection> --view schema --format json
94
+ ```
95
+
96
+ Use CLI-returned `available_view_refs`, `planned_sections`, `local_sources`, and
97
+ `next_action.command`. Do not reconstruct the structure by opening
98
+ `unapproved/structure.yaml` or `knowledge/structure.yaml` directly.
99
+
100
+ ## Procedure References
101
+
102
+ These are current compile rules for source-bound drafting, judgment, semantic
103
+ repair, and close handoff.
104
+
105
+ | Decision | Reference |
106
+ |---|---|
107
+ | Compile action drafting, section kind, coverage, summaries, content intent | [references/internal-procedures/compile-actions.md](references/internal-procedures/compile-actions.md) |
108
+ | Action/domain compile gates | [references/internal-procedures/compile-actions/references/action-domain-gates.md](references/internal-procedures/compile-actions/references/action-domain-gates.md) |
109
+ | Notes, refresh/update, and structural challenges | [references/internal-procedures/compile-actions/references/notes.md](references/internal-procedures/compile-actions/references/notes.md), [references/internal-procedures/compile-actions/references/refresh-and-update.md](references/internal-procedures/compile-actions/references/refresh-and-update.md), [references/internal-procedures/compile-actions/references/structural-challenges.md](references/internal-procedures/compile-actions/references/structural-challenges.md) |
110
+ | Support, duplicate, replacement, conflict, weak evidence, and relation judgment | [references/internal-procedures/compile-judgment.md](references/internal-procedures/compile-judgment.md), [references/internal-procedures/semantic-judgment.md](references/internal-procedures/semantic-judgment.md) |
111
+ | Leakage, ownership, temporal evidence, disposition, omit, and user confirmation | [references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md](references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md), [references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md](references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md), [references/internal-procedures/semantic-judgment/references/disposition-semantics.md](references/internal-procedures/semantic-judgment/references/disposition-semantics.md), [references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md](references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md), [references/internal-procedures/semantic-judgment/references/user-confirmation.md](references/internal-procedures/semantic-judgment/references/user-confirmation.md) |
112
+ | Close gate and current close output boundaries | [references/internal-procedures/close-gate.md](references/internal-procedures/close-gate.md) |
113
+
114
+ ## Compile Contract
115
+
116
+ The compile action payload uses `schema_version: context.compile-actions.v1`.
117
+ Compile may:
118
+
119
+ - mirror source spans as `verbatim`;
120
+ - emit `skip` decisions when no source-backed body should be written. `skip`
121
+ does not produce a placeholder candidate; generated parent-index pages use
122
+ the parent-index compile path, not an action payload placeholder.
123
+
124
+ Relationships and cross references do not go into verbatim body. In current
125
+ output they stay in `structure.yaml` typed edges; this workflow does not render
126
+ relationship reference blocks.
127
+
128
+ </reference>
129
+
130
+ <procedures>
131
+
132
+ ### Step 1 — Open Compile Context
133
+
134
+ Run:
135
+
136
+ ```bash
137
+ context run compile:<type>:<source>:<collection> --view read-plan --format json
138
+ ```
139
+
140
+ Use the returned node list, source overview, and next action. If the CLI says
141
+ the structure is missing, unconfirmed, stale, frozen against the wrong
142
+ snapshot, or invalid, return to prose align or source capture as indicated.
143
+
144
+ ### Step 2 — Inspect One Node
145
+
146
+ For each node that should become draft knowledge, run:
147
+
148
+ ```bash
149
+ context run compile:<type>:<source>:<collection> --view node-context --source <view-ref> --format json
150
+ context run compile:<type>:<source>:<collection> --view schema --format json
151
+ ```
152
+
153
+ Read the compile references listed by `semantic_reference_files` before
154
+ classifying section kind, summary, support, skip/update, weak evidence, or
155
+ structure repair.
156
+
157
+ Do not treat those references as optional background. They are the current
158
+ compile drafting, judgment, and semantic-repair procedures.
159
+
160
+ When exact evidence text is needed, use the CLI-returned source ref with the
161
+ current evidence view. Do not open snapshot files directly.
162
+
163
+ ### Step 3 — Draft And Validate Actions
164
+
165
+ Create a `context.compile-actions.v1` payload for the selected view. Prefer
166
+ omitted `content` with `source_refs[]` so the CLI mirrors source spans.
167
+ If the source evidence is non-contiguous or contains separable examples,
168
+ configuration blocks, lists, or procedures, split the compile actions when the
169
+ confirmed structure supports that split. If the structure is too coarse, return
170
+ to prose align and ask the user to confirm a section split instead of writing
171
+ summarized body text. Explicit `content` / `content_intent` is not part of the
172
+ current compile contract.
173
+
174
+ For small payloads, use stdin/heredoc. For larger payloads, write a scratch file
175
+ under `.tmp/agent-payloads/<run-id>/` and pass it through `--input`. Scratch
176
+ files are disposable agent working files; they are never compile state and must
177
+ not be read back as a substitute for CLI views.
178
+
179
+ Validate:
180
+
181
+ ```bash
182
+ context run compile:<type>:<source>:<collection> --validate --input <compile-actions.yaml> --format json
183
+ ```
184
+
185
+ Repair diagnostics by routing them to the right decision:
186
+
187
+ - source ref or planned-section mismatch -> reread node-context, or return to
188
+ structure confirmation if ownership is wrong;
189
+ - unsupported kind or op -> use the schema view and current compile references;
190
+ - explicit content -> omit `content` and mirror source, or return to align for
191
+ a section split;
192
+ - weak evidence, duplicate, conflict, omit, or scope issue -> use the compile
193
+ judgment / semantic judgment references and ask the user when required;
194
+ - frozen structure mismatch -> rerun status and return to align/capture as
195
+ directed.
196
+
197
+ Use typed diagnostics as the repair contract:
198
+
199
+ - `reason_code`, `path`, and `missing[]` identify what to fix;
200
+ - warnings are not write blockers unless the response marks them blocking or
201
+ the next action says so;
202
+ - weak evidence, duplicate, conflict, temporal, leakage, ownership, and scope
203
+ issues are semantic review issues, not formatting problems;
204
+ - raw/source-ref pointer diagnostics are evidence checks, not content-quality
205
+ judges.
206
+
207
+ When validation returns a new `next_action.command`, follow that exact command.
208
+ When it returns blocking diagnostics without a write command, repair and
209
+ validate again. Do not stage a compile payload just because the YAML shape looks
210
+ valid.
211
+
212
+ ### Step 4 — Stage Draft Candidates
213
+
214
+ Stage only after validation has no errors:
215
+
216
+ ```bash
217
+ context run compile:<type>:<source>:<collection> --stage --input <compile-actions.yaml> --format json
218
+ ```
219
+
220
+ After staging, return to `context status`. If status reaches
221
+ `compile-ready-for-review`, delegate review to
222
+ `${CLAUDE_PLUGIN_ROOT}/skills/skill-review-gate/SKILL.md`.
223
+
224
+ ### Step 5 — Close Handoff
225
+
226
+ After review apply, return to `context status`. If status says
227
+ `compile-close-needed`, run deterministic close:
228
+
229
+ ```bash
230
+ context close --format json
231
+ ```
232
+
233
+ Close derives `knowledge/structure.yaml` and edge projection from approved
234
+ knowledge, then runs the final verify gate. It must not rewrite approved
235
+ verbatim body. References, changelog, package index, and section fingerprint
236
+ rebuilds are not current close output.
237
+
238
+ Then route to package output when status reaches `ready-to-build`.
239
+
240
+ ### Step 6 — Self-verify Checklist
241
+
242
+ - [ ] Compile started from confirmed structure, not a new structure proposal.
243
+ - [ ] Node context and schema came from compile phase views.
244
+ - [ ] Compile references were read before choosing kind/summary/support.
245
+ - [ ] Actions mirror source by default and do not invent body text.
246
+ - [ ] No explicit reader-visible `content` was written by the Agent.
247
+ - [ ] Relationships are expressed as structure edges, not inserted into
248
+ verbatim text.
249
+ - [ ] No direct edits were made to `sources/`, `.tmp`, `unapproved/`,
250
+ `knowledge/`, review HTML, or `dist/`.
251
+
252
+ ### Final Report
253
+
254
+ Report in the user's language. Include only:
255
+
256
+ - view refs compiled in this round;
257
+ - candidate ids staged and whether they contain verbatim or empty sections;
258
+ - validation warnings that still matter for review;
259
+ - whether review, close, verify, or build is the next status route.
260
+
261
+ Do not report internal payload digests, source-ref hashes, internal workspace
262
+ paths, absolute paths, scratch file paths, or raw CLI JSON unless the user asks
263
+ for debug output.
264
+
265
+ </procedures>
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: close-gate
3
+ description: >
4
+ Internal procedure invoked by the current compile/continue flow; not a user
5
+ slash command. Runs after review apply. Triggers `context close --format json`,
6
+ which derives knowledge/structure.yaml, projects approved edges, and runs the
7
+ final verify gate. Agent intervention is limited to interpreting CLI output
8
+ and routing verify errors back to source capture, align structure, compile
9
+ actions, or review as appropriate. The skill never hand-edits rendered
10
+ knowledge.
11
+ tools:
12
+ - Bash
13
+ ---
14
+
15
+ # close-gate — approved structure projection + final verify
16
+
17
+ Close a compile run. The CLI does the work; the skill reads the
18
+ CLI's output and routes any failure back to the correct upstream
19
+ command. It does not hand-edit rendered knowledge.
20
+
21
+ ## TL;DR — Non-negotiables
22
+
23
+ - CLI-driven. `context close --format json` derives `knowledge/structure.yaml`,
24
+ projects approved edges, and verifies the final workspace including edge
25
+ source refs. Use the command's stdout + exit code; that's the close's full
26
+ output.
27
+ - **Agent NEVER edits rendered knowledge from the close stage.** The CLI is the
28
+ sole writer for approved structure projection. If verify reports an error
29
+ here, route it back, not around:
30
+ - Content / Section issues → re-run the current compile gate for the affected
31
+ node after fixing compile actions.
32
+ - Structural issues → return to the align structure gate and reconfirm.
33
+ - Source/evidence issues → recapture the affected source, then rerun align or
34
+ compile as status instructs.
35
+ - Exit 0 → summarise approved node count, approved edge count, structural edge
36
+ contract status, and verify status. References, changelog, package index,
37
+ section fingerprints, and full incremental cache rebuilds are not current
38
+ close output.
39
+ - Exit 2 → report the full issue list verbatim + point at the right re-entry command above. Do not hand-open the affected rendered article.
40
+ - Materialized knowledge means approved Markdown plus its approved
41
+ `knowledge/structure.yaml` projection. A compile skip action records reviewed
42
+ evidence, but it does not by itself materialize an arbitrary finalized Node.
43
+ - Never re-run compile actions from close to paper over verify failures. Draft
44
+ failures belong in the compile loop.
45
+ - Do not use Python, Node.js, shell scripts, `ls`, `find`, `rg`, `cat`, or similar ad-hoc commands to inspect `sources/`, `unapproved/`, `knowledge/`, or `dist/` files.
46
+ - Current close can self-heal stale or malformed `knowledge/structure.yaml`
47
+ projection by deriving it again from approved Markdown and approved edge
48
+ sources. It must not rewrite verbatim section body.
49
+ - LLM-assisted repair (`--fix-with-llm`) is not a current close action.
50
+ - Output language: summary prose matches the user's language; CLI output, issue codes, file paths stay as printed.
51
+ - Current align state is internal CLI state, not a file protocol. The CLI owns
52
+ this lifecycle — the agent must not move, delete, or archive workspace output
53
+ files by hand.
54
+ - Semantic decisions are applied and recorded before close. Compile-close does
55
+ not judge or rewrite semantic decisions; it only verifies the already-applied
56
+ workspace and rebuilds approved structure projection.
57
+
58
+ <reference>
59
+
60
+ ## Stages inside `context close --format json`
61
+
62
+ Close is one in-process command with one exit code:
63
+
64
+ 1. **Approved knowledge scan** — reads approved Markdown only through CLI
65
+ project readers.
66
+ 2. **Structure projection** — writes deterministic `knowledge/structure.yaml`
67
+ with nodes, approved edge projection, input hash, and structural edge
68
+ contract status.
69
+ 3. **Workspace verify** — runs the final verify gate. Any error prevents close
70
+ readiness.
71
+ 4. **Status receipt** — reports whether close is ready and which upstream gate
72
+ owns any failure.
73
+
74
+ ## Outcome routing
75
+
76
+ | Outcome | Agent action |
77
+ |---|---|
78
+ | Ready, verify pass | Summarise approved nodes, approved edges, structural edge contract, and verify status. Stop. |
79
+ | Ready, verify warnings only | Summarise warning codes and state that build may proceed when warnings are allowed by status/build gate. |
80
+ | Verify error in approved section content/evidence | Surface the issue list and route back to compile actions or source recapture as indicated by status. Do not edit approved Markdown. |
81
+ | Verify error in approved structure projection | Run `context close --format json` once more only when status says the projection is close-repairable; otherwise return to align structure. |
82
+ | Source/evidence stale or missing | Route to source capture/refresh, then rerun align/compile as status instructs. |
83
+
84
+ The close stage never edits rendered knowledge on the agent side. Every verify
85
+ error routes back to the correct upstream gate (source capture, align
86
+ structure, compile actions, or review), never sideways into a hand Edit. Use
87
+ the CLI issue code and hint printed by `context close --format json` for the
88
+ error→command mapping.
89
+
90
+ References, changelog, section fingerprints, and package index rebuilds are not
91
+ current close outputs.
92
+
93
+ </reference>
94
+
95
+ <procedures>
96
+
97
+ ### Step 1 — Invoke close
98
+
99
+ Run `context close --format json`. The caller may have already invoked it;
100
+ check for existing output before re-running.
101
+
102
+ ### Step 2 — Interpret
103
+
104
+ Use stdout + stderr. The exit code selects the path via [Outcome routing](#outcome-routing).
105
+
106
+ ### Step 3 — Route errors to the correct upstream command
107
+
108
+ For each error in the CLI's report, classify via [Outcome routing](#outcome-routing) and name the re-entry command in your report. Do NOT hand-edit rendered knowledge — that violates the CLI-sole-writer principle and masks the real upstream fix. Specifically:
109
+
110
+ - Section / content issue → rerun the current compile gate for that node.
111
+ - Structure issue → return to align structure and user confirmation.
112
+ - Source/evidence issue → recapture the affected source, then rerun align or
113
+ compile as status instructs.
114
+
115
+ One pass. If the CLI reports multiple errors, list them all and let the user choose the order; do not loop the close stage itself.
116
+
117
+ ### Step 4 — Report
118
+
119
+ Summarise in the user's language:
120
+
121
+ - Approved node count.
122
+ - Approved edge count and structural edge contract status.
123
+ - Verify result: pass / pass-with-unverifiable-evidence / fail, with issue
124
+ codes verbatim.
125
+
126
+ Stop. Do not auto-invoke follow-on commands.
127
+
128
+ ### Step 5 — Final guardrails
129
+
130
+ Run close once, surface every error with its re-entry command, and never inspect or edit rendered knowledge outside the CLI.
131
+
132
+ </procedures>
@@ -0,0 +1,52 @@
1
+ # Action and Domain gates
2
+
3
+ Consult this reference when **`node.node_type` is `action` or `domain`**. For
4
+ `entity` Nodes, ignore this file and follow the main SKILL.md procedure.
5
+
6
+ ## Action Nodes (`node.node_type === "action"`)
7
+
8
+ Treat the confirmed node type and planned sections as the compile boundary for
9
+ procedural claims. An Action Node exists because align confirmed process
10
+ evidence: steps/phases, trigger -> handling -> result, role collaboration, or a
11
+ repeatable plan. Actor, goal/outcome, repeatability, answerability, trigger,
12
+ step, and phase claims **must** come from the selected planned section
13
+ `source_refs[]`; do not invent process semantics from the title alone.
14
+
15
+ | Evidence pattern | What it authorizes |
16
+ |---|---|
17
+ | Planned section source refs contain ordered steps, phases, or repeatable handling | `spec` or `example` Sections for procedure content. |
18
+ | Planned section source refs explicitly name actor, goal, outcome, or repeatability | Concise `description` / `spec` Sections using those same refs. |
19
+ | No source ref states a trigger | **No trigger Section.** Write goal or applicability if supported, but do not fabricate a trigger sentence. |
20
+ | Existing structure edge or unresolved relation indicates another Node is required for answerability | Mention only what the current source refs support; keep the relation in structure, not in compile action fields or verbatim body. |
21
+
22
+ If the planned sections for an `action` node do not contain source-backed
23
+ process evidence, treat that as a structural defect and return to align using
24
+ [structural-challenges.md](structural-challenges.md). Do not invent an action
25
+ body just because the node type is `action`.
26
+
27
+ If the current evidence can only support one thin Section or only a parallel
28
+ option/config list, do not stretch it into procedure prose. Emit `skip` for the
29
+ unsupported planned section, or return to align so the node can be revised. The
30
+ CLI does not auto-downgrade an Action or choose replacement Entity tags.
31
+
32
+ ## Domain Nodes (`node.node_type === "domain"`)
33
+
34
+ Treat Domain nodes as grouping surfaces. The domain's scope and child grouping
35
+ are expressed by confirmed `edges[]` and by source-backed planned sections; they
36
+ do **not** authorize new reader-facing facts by themselves.
37
+
38
+ - Source refs on planned sections may orient coverage of the Domain's range, but
39
+ only those refs can support reader-facing text.
40
+ - Child relations belong to `structure.yaml` typed edges, not active Sections;
41
+ do not turn a child list into a Section.
42
+ - Align-time grouping rationale is not evidence. Do **not** turn it into a
43
+ `description` Section unless the planned source refs state the same claim.
44
+
45
+ Recall the mount matrix limit: Domain Nodes allow only `description`, `warning`, `principle`, `decision`, `faq`. A spec / example / comparison / incident / changelog landing here is a kind/type mismatch — drop down the priority chain or `skip`.
46
+
47
+ ## How this slots into the main procedure
48
+
49
+ - **Step 1 — Sanity-check**: after the standard `node.id` / mount-matrix check,
50
+ run the action/domain inspection above.
51
+ - **Step 2 — Classify**: respect the gate's authorization boundary when picking kinds.
52
+ - **Step 5 — Self-verify**: confirm no Section was written from evidence the gate disallowed.
@@ -0,0 +1,48 @@
1
+ # Note snippets
2
+
3
+ Consult this reference only when the current CLI exposes note evidence in a
4
+ source-bound phase view. Note evidence carries conversation material
5
+ (revisions, decisions, brainstorms) rather than primary source documents.
6
+
7
+ ## TL;DR
8
+
9
+ Note snippets are **prioritization hints, not write authority**. `note_intent`, `anchored_to[]`, and `revision_kind` may suggest update / replacement / complement / skip, but they never authorize a write without semantic review.
10
+
11
+ ## How to route a note snippet
12
+
13
+ When a source evidence entry has `source_type: "note"`:
14
+
15
+ 1. **Compare against the anchor first.** If `anchored_to[]` names this Node or one of its Sections, treat that target as the candidate for `update` / replacement review / `add` (as a complement) / `skip`. **Do not create a new Node** from the note title here — that is an align-time concern.
16
+
17
+ 2. **Use `note_intent` and `revision_kind` to bias the action**:
18
+
19
+ | `note_intent` | typical action |
20
+ |---|---|
21
+ | `revision` | `update` when meaning stays the same; otherwise replacement review against the anchored Section |
22
+ | `decision` | `add` a `decision` Section when no equivalent exists; otherwise `update` |
23
+ | `brainstorm` | usually `skip` unless the brainstorm explicitly confirms a fact the Node should record |
24
+
25
+ `revision_kind` (`replace` / `clarify` / ...) refines the choice within `revision`.
26
+
27
+ 3. **No-write reviewed-no-write case.** If the note says "don't modify active
28
+ knowledge yet" or the correct outcome is no-write after review, emit `skip`
29
+ with the note's current `source_refs[]` when the CLI exposes them. This lets
30
+ semantic review record `reviewed_no_write` instead of treating the skip as an
31
+ unreviewed no-op.
32
+
33
+ 4. **Bare skip is not allowed for notes.** A bare `skip` (no evidence) is only
34
+ for deterministic no-op cases such as unchanged input or pure navigation.
35
+ Notes always carry an anchor and an intent; the skip must cite the note's
36
+ explicit source ref when the current CLI exposes one.
37
+
38
+ ## Where this lives in the main procedure
39
+
40
+ - **Step 2 — Classify**: run the note-first comparison **before** the generic kind priority chain. If the note resolves to `update` / replacement review / `skip` (reviewed), record the current action or user/structure route and move on; do not also process the same note through the generic chain.
41
+ - **Step 5 — Self-verify**: every note snippet was either consumed by an
42
+ anchored action or carried into a `skip` with `source_refs[]` when the current
43
+ CLI exposes citeable refs.
44
+
45
+ Notes never become compile challenge actions on their own. If a note describes a
46
+ structural problem (missing Action, wrong parent, etc.), capture or cite the
47
+ underlying source evidence and return to the structure gate described in
48
+ `references/structural-challenges.md`.
@@ -0,0 +1,85 @@
1
+ # Refresh and update
2
+
3
+ Consult this reference when **any** of the following holds:
4
+
5
+ - `existing.sections[]` is non-empty (Node already has active knowledge; this is a refresh, not a first compile).
6
+ - `incremental.status` is `unchanged` or `full-context` (non-default incremental signals).
7
+ - `incremental.locator_only_changes[]` is non-empty (locator-only deltas without content changes).
8
+
9
+ For first compile of a fresh Node with `incremental.status === "changed-only"`, skip this file.
10
+
11
+ ## Incremental status handling
12
+
13
+ | `incremental.status` | What to do |
14
+ |---|---|
15
+ | `changed-only` (default) | Normal path — main SKILL.md procedure applies as written. |
16
+ | `unchanged` | Emit exactly one `skip` action with a brief reason. Do not iterate snippets. |
17
+ | `full-context` | Draft from the full fallback. **Preserve `unknown_inputs[]` reasons** in any abort/retry explanation so the caller sees why the fallback was needed. |
18
+
19
+ The CLI may deterministically skip unchanged output or update locator-only evidence before writing. **Do not force artificial content changes to bypass fingerprint skip** — those skips are part of the protocol, not a problem to route around.
20
+
21
+ ## Locator-only changes
22
+
23
+ `incremental.locator_only_changes[]` entries always carry `agent_action: "none"` and `handled_by: "compile-close"`. **Do not emit a draft action for those Sections** unless the same Section also appears in `changed_blocks[]` with a real content change.
24
+
25
+ ## Reconciling with `existing.sections[]`
26
+
27
+ When `existing.sections[]` is non-empty, every section id you read here is a
28
+ potential same-section `update` target or a signal that the structure/user gate
29
+ must decide a higher-risk replacement or withdrawal. Walk the existing Sections
30
+ in order and decide:
31
+
32
+ | Raw evidence vs existing Section | op |
33
+ |---|---|
34
+ | Raw still supports the existing claim unchanged | Emit nothing (or one summarising `skip`) |
35
+ | Raw clarifies or rephrases without changing meaning | `update` — same `section-N` stays active |
36
+ | Raw changes meaning (new spec value, reversed decision) | Stop and route to user/structure review; do not emulate a replacement with `update` |
37
+ | Raw removes the supporting evidence | Stop and route to user/structure review; do not hide the previous active section with a compile no-write |
38
+
39
+ ### Replacement vs `update` semantics
40
+
41
+ Replacement preserves the audit trail so readers can see that the prior policy
42
+ changed — **critical for specs / decisions / principles**. Use `update` only
43
+ for typo / wording fixes / detail additions that do not change meaning. When
44
+ meaning changes or support disappears, do not write a compile action until the
45
+ user/structure gate has chosen the intended disposition.
46
+
47
+ ### Current output mechanics
48
+
49
+ - `update` keeps the same planned section identity. In the current
50
+ `context.compile-actions.v1` shape, emit `op: "update"` with `section_id`,
51
+ `kind` when needed, `summary` when useful, and current `source_refs[]`. Omit
52
+ `content` so the CLI mirrors the new cited source span. If the intended update
53
+ requires translation, compression, or reorganization, stop and return to the
54
+ structure/user gate instead of writing reader-visible content in compile.
55
+ - Fresh replacement content is a new structure/review decision, not a current
56
+ compile write shape. Preserve the semantic judgment in the user report or
57
+ unresolved structure discussion and route back to the appropriate gate; do
58
+ not invent unsupported target fields.
59
+
60
+ ## Output shape (current update path)
61
+
62
+ ```jsonc
63
+ {
64
+ "schema_version": "context.compile-actions.v1",
65
+ "view_ref": "architecture:entity/example",
66
+ "actions": [
67
+ {
68
+ "op": "update",
69
+ "section_id": "retention-policy",
70
+ "kind": "spec",
71
+ "summary": "...",
72
+ "source_refs": ["file:docs/example.md#span:retention L10-14@<span-hash>"]
73
+ }
74
+ ]
75
+ }
76
+ ```
77
+
78
+ ## How this slots into the main procedure
79
+
80
+ - **Step 1 — Sanity-check**: when `existing.sections[]` is non-empty, read every section id and status before classifying snippets. When `incremental.status` is `unchanged`, short-circuit with one `skip`.
81
+ - **Step 2 — Classify**: still walk the kind priority chain for each citation-eligible snippet; the reconciliation table above governs which `op` to emit for snippets that map to an existing Section.
82
+ - **Step 5 — Self-verify**: every `update` targets a known planned section id
83
+ from the confirmed structure. If a replacement or withdrawal judgment has no
84
+ accepted compile action shape, stop and route back through review/align
85
+ instead of emitting unsupported fields.
@@ -0,0 +1,73 @@
1
+ # Structural and ownership challenges
2
+
3
+ Consult this reference when the cited evidence **cannot be written as a Section under the current confirmed structure**:
4
+
5
+ - The evidence describes a coherent process that should be its own `action` Node (not a Section here).
6
+ - The evidence implies a missing `depends_on` edge between Nodes.
7
+ - The evidence belongs under a different parent Node.
8
+ - A finalized shared-block split leaves this Node with only secondary, non-citable evidence.
9
+ - A visible `context_only` or secondary-shared block contains facts that need citation, requiring an ownership upgrade.
10
+
11
+ In these cases, do **not** force the content into a Section. The current
12
+ `context.compile-actions.v1` schema does not accept challenge actions. Stop the
13
+ compile draft for this Node, report the structure defect, and return to the
14
+ prose align gate so the structure can be revised as `unresolved[]`, a corrected
15
+ node, a corrected section plan, or a typed edge.
16
+
17
+ ## When to challenge vs. when to skip
18
+
19
+ | Situation | Route |
20
+ |---|---|
21
+ | Evidence is a repeatable procedure with steps that clearly warrant a sub-Action | Return to align and propose a new or corrected `action` node. |
22
+ | Evidence depends on a Node that the current structure does not link to this Node | Return to align and add a source-backed typed edge such as `depends_on`, `prerequisite`, or `applies_to`, or keep it in `unresolved[]` when evidence/target is incomplete. |
23
+ | Evidence belongs under a different parent | Return to align and move the planned section source refs to the correct node. |
24
+ | The planned section has no primary source-backed evidence for this Node | Return to align and revise section ownership/source refs, or remove the node if it should not exist. |
25
+ | The Node should not exist because its evidence belongs elsewhere | Return to align and remove or replace the node before compile. |
26
+ | Background/context evidence holds facts this Node needs to cite | Return to align and make those source refs owned by the correct planned section, or keep the issue unresolved. |
27
+
28
+ Use challenge labels only as private reasoning labels in your user explanation.
29
+ Do not put them in `context.compile-actions.v1`.
30
+
31
+ ## Report shape
32
+
33
+ When this reference triggers, do not submit a compile payload for the affected
34
+ Node. Report a compact structure repair request to the user and the align gate:
35
+
36
+ ```jsonc
37
+ {
38
+ "reason_code": "structure_reconfirmation_required",
39
+ "issue": "missing_action_node",
40
+ "view_ref": "<matches selected view_ref>",
41
+ "summary": "The cited evidence is a repeatable procedure.",
42
+ "source_refs": ["file:docs/runbook.md#span:ops L40-55@<span-hash>"],
43
+ "align_repair": "Add a supported action node or keep the issue in unresolved[]."
44
+ }
45
+ ```
46
+
47
+ The actual committed repair is a revised `context.structure.v1` payload. Use
48
+ the align schema and validation diagnostics for that repair; do not invent a
49
+ compile action shape.
50
+
51
+ ## What these are NOT
52
+
53
+ - **Not a substitute for `skip`** when raw simply has no write-worthy fact for this Node.
54
+ - **Not a Section.** Structure defects never appear in active knowledge.
55
+ - **Not a compile action.** Do not encode them as `op` values in
56
+ `context.compile-actions.v1`.
57
+ - **Not a free retargeting path.** Do not switch `view_ref`, `section_id`, or
58
+ `source_refs[]` inside compile merely to make validation pass. The confirmed
59
+ structure must be repaired first.
60
+ - **Not a free upgrade path.** Exact text views expose visible evidence text for
61
+ inspection, but they do not change section ownership. If you need to cite
62
+ background content, return to align and revise ownership/source refs.
63
+
64
+ ## How this slots into the main procedure
65
+
66
+ - **Step 3 — Build actions**: when evidence implies a missing Action, missing
67
+ edge, wrong parent, or needed ownership/source-ref repair, stop the compile
68
+ draft for this Node and return to align instead of writing a Section.
69
+ - **Step 5 — Self-verify**: no Section write cites source refs outside the
70
+ planned section ownership; if any did, remove the action and return to align.
71
+ - **Review handoff**: if a user asks why compile stopped, explain the structure
72
+ effect plainly: paths, ownership, and relations are frozen at compile time, so
73
+ these repairs need a new confirmed structure rather than a draft-page patch.