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

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 (262) hide show
  1. package/README.md +115 -123
  2. package/babel.cjs +257 -0
  3. package/cli.js +51018 -96457
  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 -85
  10. package/plugin/README_CN.md +92 -84
  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 +402 -0
  37. package/plugin/skills/skill-source-scope/references/capture-source.md +171 -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 +402 -0
  78. package/plugins/claude/skills/skill-source-scope/references/capture-source.md +171 -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 +171 -0
  112. package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +402 -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 +171 -0
  138. package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +402 -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 +402 -0
  173. package/plugins/cursor/skills/skill-source-scope/references/capture-source.md +171 -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 +171 -0
  199. package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +402 -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 +171 -0
  225. package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +402 -0
  226. package/scripts/build-plugin.ts +70 -126
  227. package/plugin/commands/align.md +0 -71
  228. package/plugin/commands/capture.md +0 -113
  229. package/plugin/commands/compile.md +0 -103
  230. package/plugin/commands/context.md +0 -35
  231. package/plugin/commands/drop.md +0 -38
  232. package/plugin/commands/extract.md +0 -18
  233. package/plugin/commands/purge.md +0 -22
  234. package/plugin/commands/query.md +0 -22
  235. package/plugin/commands/status.md +0 -25
  236. package/plugin/skills/skill-align-workflow/SKILL.md +0 -110
  237. package/plugin/skills/skill-align-workflow/references/candidate-resolution.md +0 -60
  238. package/plugin/skills/skill-align-workflow/references/density-profile.md +0 -16
  239. package/plugin/skills/skill-align-workflow/references/gates.md +0 -162
  240. package/plugin/skills/skill-compile-close/SKILL.md +0 -127
  241. package/plugin/skills/skill-compile-draft/SKILL.md +0 -175
  242. package/plugin/skills/skill-compile-draft/references/action-domain-gates.md +0 -34
  243. package/plugin/skills/skill-compile-draft/references/notes.md +0 -34
  244. package/plugin/skills/skill-compile-draft/references/refresh-and-update.md +0 -71
  245. package/plugin/skills/skill-compile-draft/references/structural-challenges.md +0 -76
  246. package/plugin/skills/skill-compile-judge/SKILL.md +0 -112
  247. package/plugin/skills/skill-context-query/SKILL.md +0 -233
  248. package/plugin/skills/skill-drop/SKILL.md +0 -189
  249. package/plugin/skills/skill-semantic-reconcile/SKILL.md +0 -136
  250. package/plugin/skills/skill-semantic-reconcile/references/leakage-and-ownership.md +0 -31
  251. package/plugin/skills/skill-semantic-reconcile/references/mode-semantics.md +0 -41
  252. package/plugin/skills/skill-semantic-reconcile/references/scope-review-and-omit.md +0 -60
  253. package/plugin/skills/skill-semantic-reconcile/references/temporal-and-evidence.md +0 -58
  254. package/plugin/skills/skill-semantic-reconcile/references/user-confirmation.md +0 -71
  255. package/scripts/build-aspect-runtime.ts +0 -45
  256. package/templates/aspect-runtime/aspectRunnerSdk.js +0 -776
  257. package/templates/aspects/README.md +0 -517
  258. package/templates/aspects/code/README.md +0 -48
  259. package/templates/aspects/code/aspect.yaml +0 -21
  260. package/templates/aspects/design-system/README.md +0 -26
  261. package/templates/aspects/graphql/README.md +0 -24
  262. package/templates/aspects/openapi/README.md +0 -24
@@ -1,103 +0,0 @@
1
- ---
2
- description: "Compile the confirmed align plan into source-linked knowledge through CLI-guided workflow steps."
3
- argument-hint: "[--plan|--aspect code [slug]|--aspect <name>|--all]"
4
- allowed-tools: Bash(context:*)
5
- ---
6
-
7
- ## Your Task
8
-
9
- Synthesize finalized align structure into knowledge. The CLI owns workflow routing, validation, reconciliation, apply, close, payload storage, and recovery commands. The agent reads evidence and emits semantic payloads only when `next_action` asks for them.
10
-
11
- Naming convention:
12
-
13
- - `/context:*` names user slash commands.
14
- - `context ...` names CLI primitives.
15
- - `context:skill-*` names packaged internal procedures, not user slash commands.
16
-
17
- ### Modes
18
-
19
- - **Default** — follow `context compile scan --format json` and the returned `next_action` until compile is closed or no work remains.
20
- - **`--plan`** — validate per-Node draft changes without closing or writing active knowledge; stop after the planned changes are reported.
21
- - **`--aspect code [selector]`** — run `context compile --aspect code [selector]`, report the CLI result, and stop unless the CLI asks for a follow-up close. The selector may be omitted to process all actionable code sources; when present, the CLI resolves source slug, package name, or module path.
22
- - **`--aspect <name>`** — run deterministic custom aspect projection for one configured aspect. Use `context compile --aspect <name> --allow-large-deprecate` only when the CLI rejected a large deprecate and the user confirms the runner output is intentionally empty or reduced.
23
- - **`--all`** — run `context compile --all` to materialize code projection first and then custom aspect projections in deterministic order.
24
- - **Delegated** — add `--delegated` only when the user explicitly authorized delegated mode at the start of this conversation. Delegated mode records scoped authority for low-risk reconcile/review/apply defaults; it does not auto-draft Node content or replace agent evidence reading. Do not infer it from vague "continue" permission.
25
-
26
- ### Core Rules
27
-
28
- - Follow top-level `next_action.kind` and `next_action.command` for every write.
29
- - Use `views[].command` for evidence reads, prioritizing `expected: true`.
30
- - Treat `allowed_actions[]` as permission for read-only insertions; it is not a menu of alternate write paths.
31
- - Treat `agent_hints[]`, when present, as a temporary mirror or diagnostic. If it conflicts with `next_action`, follow `next_action`.
32
- - Do not use direct file tools, shell scripts, `jq`, `sed`, `cat`, `head`, `tail`, Python, or Node.js to inspect workspace storage, workflow payload files, or `--format json` stdout.
33
- - Workflow write digest flags are stale guards. Omit `--payload-digest` unless the returned command explicitly requires one; when an explicit digest is needed, use `context workflow show --payload <name> --digest-only --format text` instead of parsing JSON stdout.
34
-
35
- Protocol discovery:
36
-
37
- - `context schema workflow.next-action-envelope.v2 --view minimal --format json`
38
- - `context protocol show align-compile --format json`
39
- - command-specific `context schema <name> --view minimal --format json`
40
-
41
- ## Start
42
-
43
- 1. Run `context compile scan --format json` (or `context compile scan --delegated --format json` only for explicit delegated mode).
44
- 2. If the scan returns `close_compile`, run the returned close command even when there are no changed Nodes; finalized no-write/container Nodes may still need close materialization.
45
- 3. If the scan returns `stop_noop` or no changed work, report that compile stopped before draft and no files were written.
46
- 4. Run `context status --view summary --format json` or `context mdrive workspace stats --format json` only when needed for the final before/after report or when the CLI asks for diagnostics. Do not run doctor/status/source-list as a required preflight before following a valid compile scan or align-finalize handoff.
47
-
48
- Run `context compile scan` only for this initial preflight unless the CLI explicitly returns it as the next command after a terminal/no-work state. During an active compile workflow, discover the next node from the current envelope (`next_action`, `views[]`, `workset_progress`) and follow returned commands; do not rerun scan between node cycles to probe for the next node.
49
-
50
- ## Main Loop
51
-
52
- Repeat until the CLI returns `stop_noop`, `close_compile` succeeds, or a blocking user question remains.
53
-
54
- Carry the latest envelope forward between iterations. After a successful node cycle, continue from its returned `next_action.command` / `workset_progress` rather than restarting at `context compile scan`.
55
-
56
- ### Step 1 — Read Node Evidence From The Envelope
57
-
58
- Run the evidence command returned by the envelope before writing. `views[].expected` identifies the default compact evidence entry, not a separate checklist to exhaust. For compile evidence, prefer the CLI-returned source-ref/scaffold views. They may expose:
59
-
60
- - `source_refs_index_command` / `source_refs_command` — compact Node-scoped citation index for drafting; use `items[].block_id` in `source_block_ids[]` when the row is the evidence you will cite. Multiple block ids in one action must be one same-source contiguous citation-eligible run; split around skipped citation-eligible rows or use `--draft-scaffold` when unsure.
61
- - `source_refs_detail_command` — detailed source refs with quote previews; open only when the compact index is not enough.
62
- - `request_full_text_command` / `--view text` — narrow text view for one block when quote preview is not enough; this is still Node-scoped, not a workspace evidence bundle.
63
- - `citable_source_refs[]` — detailed-view refs eligible for draft citations; prefer `block_id` values in `source_block_ids[]`.
64
- - `supporting_context_refs[]` — background/framing only.
65
- - diagnostics such as citation eligibility, coverage, engagement, stale raw/source_ref pointers, and advisory foldbacks.
66
-
67
- Follow `page.next_command` for pagination. Use `how_to_explore[]` for narrow reads. Do not expand workflow payloads through host tool-results. Node-cycle receipts are compact by default; `actions_meta[]` exposes current draft action handles for patching without an extra status read. When advisory foldbacks say `agent_recommended_action: ignore`, do not inspect each detail row unless the user asks for cleanup or the cited source appears to lose meaning.
68
-
69
- ### Step 2 — Produce Payloads Only When Requested
70
-
71
- For `submit_compile_cycle`, load the Node evidence via the returned command/views, invoke packaged `context:skill-compile-draft` for exactly one Node, and pass the emitted JSON on stdin to the returned `next_action.command`.
72
-
73
- Prefer heredocs for small payloads. If large or parallel draft payloads need staging, use the workspace AGENTS.md scratch path (`.context/.tmp/agent-payloads/<run-id>/...` in embedded workspaces, `.tmp/agent-payloads/<run-id>/...` in root-layout workspaces) and redirect stdin from that file. Never reuse fixed names like `/tmp/c4a-draft-<node>.json`, and never use scratch paths as workflow handoff or CLI-managed storage.
74
-
75
- For `continue_compile_cycle`, do not invoke the draft skill and do not attach `--input`; execute the returned `next_action.command` exactly. `--continue` resumes a saved draft session. If it returns `status: "noop"`, follow the returned `close_compile` next action.
76
-
77
- For `patch_compile_draft`, submit only the patch schema requested by the CLI. Use `actions_meta[].action_id` for `replace_action` / `remove_action`, or `add_action` with `before` / `after`; do not use generic `op/path/value` aliases.
78
-
79
- For `review_reconcile_decisions`, first inspect the returned command and prepare summary. If the command is `context reconcile review --accept-safe-defaults ...` with no `--decisions -`, run it directly; the CLI is accepting only mechanical defaults. If manual decisions remain, load the prepare payload through CLI views such as `context workflow show --payload prepare --view issues --unwrap --format json`, accept default_decision items with compact `{ item_id, accept_default: true }` when you can verify they are appropriate, and invoke packaged `context:skill-compile-judge` only for items that still need support/relation judgment. For hand-authored decision payloads, run `context reconcile validate --mode compile --node <slug> --decisions - --format json`, repair any blocking diagnostics, then pass validated decisions to the returned review command.
80
-
81
- Do not treat every `review_reconcile_decisions` envelope as a judge request. Invoke `context:skill-compile-judge` only when the prepare summary includes `judge_handoff` or the returned diagnostics explicitly ask for support/relation judgment. If `questions` are present but `next_action.kind` is `patch_compile_draft`, patch the draft first; do not infer judge mode from question counts.
82
-
83
- For `apply_reconcile_review`, execute the returned plain apply command exactly, typically `context reconcile apply --format json`; do not add `--decisions` or stdin. For `close_compile`, `finish_current_node`, `submit_coverage_disposition`, or `abandon_or_rescan`, execute the returned command exactly. If it rejects, follow the new `next_action` and `reason_code`.
84
-
85
- ### Step 3 — Repair From Diagnostics
86
-
87
- Use typed diagnostics as the repair contract:
88
-
89
- - `reason_code`, `path`, and `missing[]` identify what to fix.
90
- - `diagnostics.auto_repaired[]` records mechanical repairs; warning severity must be surfaced in the final report.
91
- - `diagnostics.warnings[]` with info/advisory severity are not write blockers unless `blocking: true` or the next action says so.
92
- - `agent_recommended_action` classifies warning handling: `ignore` means continue unless the user asks for cleanup, `respond_optional` means repair only when semantically useful, and `respond_required` means resolve before the returned write action can succeed.
93
- - Raw/source_ref pointer diagnostics are mechanical evidence checks, not content-quality judges. Do not patch drafts only to satisfy URL/style/term-overlap preferences. Blocking evidence checks should come from invalid source refs, stale raw mirrors, changed evidence boundaries, or explicit top-level `next_action`.
94
- - stale prepare refresh returns `review_reconcile_decisions` with `reason_code: "prepare_refreshed"`; reread the new prepare result before reviewing.
95
- - If close reports a finalized Node that needs only block ownership/support repair, use `context compile repair ownership --input - --format json` with the `align.ownership-patch.v2` shape. This is the compile-family repair path and preserves completed node-cycle progress. Do not abandon the active compile workflow just to run `context align patch ownership`.
96
-
97
- Do not recover by replaying an old manual path, editing rendered files, or guessing schema aliases.
98
-
99
- ## Close And Report
100
-
101
- When `next_action.kind` is `close_compile`, execute `context compile close` through packaged `context:skill-compile-close` or the returned command. Never claim success unless close exits 0 and verify is green, except the explicit no-work path.
102
-
103
- Report in the user's conversation language. Include semantic apply counts, close/verify status, warning-level `auto_repaired[]`, `ready_with_debt` coverage summaries when present, and before/after workspace totals. Do not surface internal workflow payload digests, source-ref hashes, archive paths, or absolute file paths unless a user-facing report view explicitly returns them.
@@ -1,35 +0,0 @@
1
- ---
2
- description: "Fuzzy router for context operations. Inspect the argument and route to the correct /context:* subcommand."
3
- argument-hint: "<free text | url | source-id | question>"
4
- allowed-tools: Bash(context:*)
5
- ---
6
-
7
- ## Your Task
8
-
9
- Inspect `$ARGUMENTS` and delegate to the most appropriate subcommand. Route without running anything of your own first — let the target subcommand drive.
10
-
11
- Any prose you speak to the user (clarifying questions, "routing to …" notes) follows the user's conversation language. Sub-command names (`/context:capture`, `/context:compile`), flag names, and source-ids stay English.
12
-
13
- Naming convention: `/context:*` names user slash commands and `context ...` names CLI primitives. Internal packaged procedures are workflow-only; this router dispatches only slash commands and does not call packaged procedures directly.
14
-
15
- Routing rules (first match wins):
16
-
17
- 1. **Empty arguments** → run `/context:status`.
18
- 2. **Starts with `http://` or `https://`** → `/context:capture $ARGUMENTS`.
19
- 3. **Ends in `.md` and is explicitly presented as source material to ingest/capture** → `/context:capture $ARGUMENTS`.
20
- Driver documents such as run instructions, handbooks, READMEs, plans, feedback issues, corpus/index/manifests, and batch lists are not capture targets unless the user explicitly asks to ingest them. Capture only ingest targets that are already explicit in the user request; if they are missing, ask one clarification.
21
- 4. **Equals `--inbox` or `--refresh`** → `/context:capture $ARGUMENTS`.
22
- 5. **Matches `init`, `initialize`, `new workspace`, or looks like a plain workspace name** → `/context:init $ARGUMENTS`.
23
- 6. **Mentions `code` or source-code capture** → `/context:capture --code $ARGUMENTS`.
24
- 7. **Mentions `aspect` without a concrete supported capture flag** → ask one clarification; code aspect capture is exposed as `/context:capture --code`.
25
- 8. **Matches `align`, `structure`, `plan`, `node tree`** → `/context:align $ARGUMENTS`.
26
- 9. **Matches `compile`, `recompile`, `synthesize`, or `build knowledge`** → `/context:compile $ARGUMENTS`.
27
- 10. **Matches `drop`, `retract`, `delete source`, or passes a known source-id pattern (`feishu:*` / `local:*` / `aspect:*` / `oncall:*` / `meeting:*`)** → `/context:drop $ARGUMENTS`.
28
- 11. **Matches `purge`, `clear archive`, `delete archive`, or `清理归档`** → `/context:purge $ARGUMENTS`.
29
- 12. **Equals `status`, `health`, `overview`, `summary`, or asks for workspace/cache/plugin health** → `/context:status`.
30
- 13. **Anything else** (likely a knowledge question) → `/context:query $ARGUMENTS`.
31
-
32
- If multiple rules apply, pick the most specific (URL beats word match). When in doubt, ask one clarifying question before dispatching.
33
- Never use Read / Glob / Grep / Write against `WORKSPACE_DIR`; route to packaged `/context:*` commands and skills instead of opening plugin or workspace files manually.
34
- Never use Python, Node.js, shell scripts, `ls`, `find`, `rg`, `cat`, or similar ad-hoc commands to inspect or preprocess `WORKSPACE_DIR`, `.context`, or `/tmp` workflow artifacts.
35
- Do not use `context workspace` search/read as this router's knowledge fallback; route likely knowledge questions to `/context:query` so the query skill owns retrieval and citations.
@@ -1,38 +0,0 @@
1
- ---
2
- description: "Drop a source: CLI plans cleanup, reconciles affected Sections when needed, then applies safely."
3
- argument-hint: "<source-id|url> [--reason <text>] [--yes]"
4
- allowed-tools: Bash(context:*)
5
- ---
6
-
7
- ## Your Task
8
-
9
- Retract a source without losing the audit trail. The CLI owns source resolution, impact planning, semantic decision application, knowledge cleanup, source stamp, changelog append, and verify; the agent presents the impact plan and waits for confirmation.
10
-
11
- Naming convention:
12
-
13
- - `/context:*` names user slash commands.
14
- - `context ...` names CLI primitives.
15
- - Internal packaged procedures invoked by slash workflows are not user slash commands.
16
-
17
- Use packaged `context:skill-drop` end to end, including the self-verify checklist at the end.
18
-
19
- Parse `$ARGUMENTS` for `<source-id|url>`, optional `--reason <text>`, and optional `--yes`. Source validation is done by `context drop --plan`; if absent or already `dropped`, relay the CLI's error and stop. If `--reason` is missing but the user gave a clear natural-language reason, infer a concise reason; otherwise ask for it before applying the plan. `--yes` skips the original drop impact confirmation only; it never skips semantic `ask_user` questions.
20
-
21
- Language policy: any prose you speak directly to the user follows the user's conversation language. CLI output, source-ids, command names, file paths, flags, and issue codes stay as printed.
22
-
23
- Never Read / Glob / Grep / Write workspace files directly. All workspace access goes through semantic CLI commands such as `context drop --plan`, `context reconcile prepare --mode drop`, `context reconcile review`, `context drop --apply-plan`, and `context source`. If you need the semantic decision shape, run `context schema semantic-decisions` for JSON or `context schema semantic-decisions --format yaml` for readable YAML; do not infer it from memory.
24
- Never use Python, Node.js, shell scripts, `ls`, `find`, `rg`, `cat`, or similar ad-hoc commands to inspect or preprocess workspace storage or temporary workflow artifacts. Consume CLI JSON/YAML/text outputs directly. Do not pipe `context ... --format json` through `python3`, `node`, `jq`, `sed`, `cat`, `2>&1`, or shell fallback wrappers.
25
- Plan handoff is workflow-scoped. Run `context drop --plan <target> --format json`; the CLI stores the drop-plan payload in the current workflow. `--save-output` is only for an explicit human-readable scratch copy and must not be passed to later steps.
26
-
27
- ## Final Report
28
-
29
- Report in the user's conversation language. Translate section headings into the user's language instead of copying the English labels below verbatim. Optimize for human readability: name the dropped source by its title, use Node titles instead of slugs, and use Section kind plus heading for each archived Section. Do not surface source ids, content hashes, archive directory paths, semantic ledger ids, or workflow payload identifiers.
30
-
31
- Stable structure:
32
-
33
- 1. Completion headline. Single line naming the dropped source by title plus verify status (for example "「<source title>」 dropped, verify ok"). Capture data from `context drop --apply-plan --format json`.
34
- 2. Affected Node tree. Group archived Sections by their owning Node. Each Node entry shows the Node title and Node type; below it list the archived Sections with their kind plus a short heading/preview that identifies which Section was archived (not the section id). Include Nodes whose alias mappings or visibility changed even when no Section was archived. Omit the tree entirely when the plan was a no-op or alias-reindex-only.
35
- 3. Variance summary. Bullet list of counts: archived Sections, affected Nodes, semantic decisions applied, and the final verify status. Show every counter so the user can verify nothing unexpected fired, including zeros.
36
- 4. Next step. Single command suggestion: `/context:status` to inspect the current knowledge distribution, or `/context:purge` when the user wants to permanently clear the archived snapshots.
37
-
38
- Do not include raw drop-plan digests, archive directory paths, or workflow payload identifiers in the report. Those belong in earlier troubleshooting output, not in the completion summary.
@@ -1,18 +0,0 @@
1
- ---
2
- description: "Debug helper: run extraction against a path and print structured results (no files written)."
3
- argument-hint: "<path> [--format json|jsonl|pretty]"
4
- allowed-tools: Bash(context:*)
5
- ---
6
-
7
- ## Your Task
8
-
9
- Run `context extract $ARGUMENTS` and stream the CLI's stdout back to the user.
10
-
11
- - The command is **state-required**: it runs only from inside an initialized context workspace. Outside a workspace the CLI exits with a workspace-not-found error — relay it and suggest `/context:init`, do not try to guess a workspace location.
12
- - It is strictly read-only — never writes into workspace files.
13
- - Default format is `json`; `--format jsonl` is line-delimited per entity; `--format pretty` is human-readable.
14
- - Useful for inspecting what `/context:capture --code` would capture without creating a bucket.
15
-
16
- If the user wants to persist the extraction as a raw snapshot, redirect them to `/context:capture --code`.
17
-
18
- Language policy: stream CLI stdout/stderr verbatim. Any explanation you add follows the user's conversation language; paths, JSON keys, command names, flags, and error tokens stay as printed.
@@ -1,22 +0,0 @@
1
- ---
2
- description: "Permanently delete all archived dropped source/knowledge artifacts after confirmation."
3
- argument-hint: "[--yes]"
4
- allowed-tools: Bash(context:*)
5
- ---
6
-
7
- ## Your Task
8
-
9
- Purge the workspace archive. This is destructive: it deletes all restorable
10
- source/knowledge artifacts created by `context drop --apply-plan`.
11
- It does not modify active sources or active knowledge.
12
-
13
- It does not delete compile/align scratch archives. Those are kept under the
14
- output lifecycle so prior agent inputs remain inspectable; clean them
15
- manually or via a future output-retention policy, not with `context purge`.
16
-
17
- Run `context purge $ARGUMENTS`. If `--yes` is absent, the CLI prints a summary
18
- and asks for confirmation. Relay that summary in the user's language and do not
19
- try to inspect archive storage yourself.
20
-
21
- Never Read / Glob / Grep / Write workspace files directly. All workspace access
22
- goes through semantic CLI commands such as `context purge` and `context source`.
@@ -1,22 +0,0 @@
1
- ---
2
- description: "Answer a local knowledge question through context query hit/miss/select results and cited supplemental views."
3
- argument-hint: "<question>"
4
- allowed-tools: Bash(context:*)
5
- ---
6
-
7
- ## Your Task
8
-
9
- Naming convention:
10
-
11
- - `/context:*` names user slash commands.
12
- - `context ...` names CLI primitives.
13
- - Internal packaged procedures invoked by slash workflows are not user slash commands.
14
-
15
- Use packaged `context:skill-context-query` end to end for `$ARGUMENTS`.
16
-
17
- This command is intentionally a thin entrypoint. Do not duplicate the query protocol here; the skill owns the hit/miss/select handling, supplemental lookup, citation, gap, and broad-query rules.
18
- The packaged skill also owns scoped orientation filters such as `context query --intent orientation --tag <tag>` / `--domain <slug>`, Node lookup through `context query --intent node_lookup --query "<keyword>"`, Node views through `context query --intent node_view --scope <slug>`, and Section search through `context query --intent section_search --scope <slug> --query "<keywords>"`.
19
-
20
- Never use direct workspace file tools for local knowledge. Workspace evidence must come from `context query` commands only; the packaged skill may run its documented `context query --intent orientation` or empty `context query` command before querying, but that output is not evidence.
21
- Never use Python, Node.js, shell scripts, `ls`, `find`, `rg`, `cat`, or similar ad-hoc commands to inspect `WORKSPACE_DIR`, `.context`, or `/tmp` workflow artifacts while answering a query.
22
- Use the default `context query` text output. Cite returned `node` and `section` handles; do not invent source provenance or inspect workspace files.
@@ -1,25 +0,0 @@
1
- ---
2
- description: "Print the current workspace overview (sources, raw counts, knowledge counts, last compile) and suggested next actions."
3
- argument-hint: ""
4
- allowed-tools: Bash(context:*)
5
- ---
6
-
7
- ## Your Task
8
-
9
- Run `context status` from the active workspace root only. `status` is intentionally local-only and does not walk up from child directories. If the CLI reports `workspace-not-found`, relay that error and ask the user to rerun from the workspace root or initialize with `/context:init`; do not probe storage paths to discover a workspace.
10
-
11
- Surface the CLI's output verbatim — its trailing suggestions are already actionable. Do not invent additional suggestions; the CLI decides what to recommend based on the workspace state. Typical recommendations you will see:
12
-
13
- - Run `/context:align` when there is active raw material but no align plan yet (compile's Stage 1 prerequisite).
14
- - Run `/context:align` when JSON status reports `incremental.pending_align.status: "pending"` with `count > 0`. This structural signal takes precedence over a previous finalized align workflow's compile hint.
15
- - Run `/context:compile` when align plan exists and raw is newer than the last compile.
16
- - Run `/context:capture --code` when the repo is a git checkout but no source-code snapshot has been captured yet.
17
- - Run `context compile --aspect code` when code projection is pending, or `context compile --aspect <name>` when a custom aspect projection is pending. JSON status includes `aspect_projection` and `code_projection` summaries for these deterministic paths.
18
-
19
- Recent CLI output may include `incremental.cache_status`, `incremental.pending_align`, and `incremental.pending_compile`. Surface those fields verbatim. If the user asks what they mean, explain that they show the local incremental cache health and queued align/compile work; cache warnings are informational unless the CLI output includes a blocking error or an explicit next action.
20
-
21
- Workflow lineage helpers are exposed through `context workflow status --format json` and `context workflow list --format json`. If status returns `current: null` with `last_published`, the published finalized ownership is still the workspace structure truth; compile may continue from it without rerunning align.
22
-
23
- If the CLI exits with a workspace-not-found error, stop and invite the user to run `/context:init` instead of guessing a workspace location.
24
-
25
- Language policy: surface the CLI output verbatim. Any extra explanation or workspace-not-found invitation follows the user's conversation language; command names, paths, status labels, source-ids, and issue codes stay as printed.
@@ -1,110 +0,0 @@
1
- ---
2
- name: skill-align-workflow
3
- description: "Internal procedure for /context:align. Reads CLI-guided align evidence, applies semantic Node classification gates, and emits align structure-intent payloads for CLI validation/finalize."
4
- ---
5
-
6
- # Align Workflow Procedure
7
-
8
- ## TL;DR
9
-
10
- Run `context align scan --format json`, follow the top-level `next_action.command` to read the CLI-selected evidence path, produce semantic structure payloads, 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.
11
-
12
- <reference>
13
-
14
- ## Canonical Data
15
-
16
- - `workflow.next-action-envelope.v2` is authoritative. Branch on `next_action.kind`, execute `next_action.command`, and treat `views[].command` as detail reads rather than a checklist.
17
- - `allowed_actions[]` may permit extra read-only work before the next write; it is not a menu of alternate write paths.
18
- - `agent_hints[]`, when still present, is a short-term cutover mirror or diagnostic. Do not prefer it over top-level `next_action`.
19
- - Schema names and enum values come from `context schema <name>`. Use `--view minimal` first; for authoring schemas such as `align-structure-intent`, the minimal view includes required fields, enums, and a minimal payload example. Read the full schema only when you need extended notes or edge-case examples.
20
- - Existing knowledge is the lookup registry. Use `context mdrive glossary match <name>` and `context mdrive node list --format json`; do not read `knowledge/**` or create a separate registry file.
21
- - 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.
22
- - `diagnostics.automatic_ownership_adjustments[]` and validation diagnostics are the mechanical structural-block ownership source of truth. Source-wide owned/shared defaults automatically demote non-content blocks such as navigation references, placeholders, front matter, marker quotes, embed tags, and embedded assets to `context_only` or `ignored`; submit an explicit `block_ownership[]` owned/shared entry only when such a block is primary citation evidence.
23
- - When `pending-relation-refs` is present, inspect it before finalizing graph structure. Use existing/current matches for `contains_parent_ref` or `domain_gate.child_refs`; keep unresolved target slug hints deferred and do not write dangling parent, child, or edge refs. For navigation-only / placeholder-only sources, first preserve useful source/page identities as no-write Nodes with root-level `planned_sections: []` when an explicit retrieval need, graph need, or atomic/concrete title gives the page standalone retrieval value; this no-write Entity priority can apply even when every child ref is unresolved. Never put `planned_sections` inside `domain_gate`. Those kept placeholders need support through `context_only` blocks with `visible_to`, owned/shared evidence, or finalized graph support. If a placeholder/relation source is skipped entirely, still classify its coverable blocks with a source-wide `ownership_groups[]` rule, usually `ignored` for pure placeholders. `ignored` only disposes unused material and does not support a placeholder by itself. Domain placeholders may have `domain_gate.child_refs: []` when every child is still deferred. Only use `entity[term]` when the source title is an atomic term.
24
- - `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.
25
- - 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.
26
- - Workflow digest flags are stale guards. Follow returned `next_action.command` and omit optional digest flags unless the CLI asks for one; if an explicit digest is needed, recover it with `context workflow show --payload <name> --digest-only --format text`, not JSON parsing.
27
- - Node type, tag, fake-Entity, `domain`, and `action` gates are in `references/gates.md`.
28
- - Coarse reading density and neutral signal rules are in `references/density-profile.md`.
29
- - Candidate anomaly handling, `label_hint`, and `llm_slug_hint` reference rules are in `references/candidate-resolution.md`.
30
-
31
- </reference>
32
-
33
- <procedures>
34
-
35
- Use this only inside `/context:align`.
36
-
37
- ### Step 1 — Start From The Envelope
38
-
39
- Run `context align scan --format json`. Confirm `schema_version: "workflow.next-action-envelope.v2"`, then identify `next_action`, `views`, `workflow`, `route`, and `diagnostics`.
40
-
41
- If the host truncates scan stdout but the preview includes top-level `next_action.command`, run that command. If `next_action` is not visible, rerun the scan command; do not recover host tool-result files.
42
-
43
- If no envelope is present, stop and surface the CLI output; do not reconstruct an align route from old prompt memory.
44
-
45
- ### Step 2 — Follow The Evidence Read Path
46
-
47
- Run the returned `next_action.command`. For structural align work this is normally `read-plan`; after that, follow the `read-plan` / `source-bundle` response's `next_action.command`.
48
-
49
- `read-plan` is the navigation surface. It chooses whether the next evidence read is a whole-batch `source-bundle`, a scoped source/window bundle, or an existing coarse-read route. `source-bundle` is annotated source text; read it and then author the requested align JSON yourself, normally `align-structure-intent`. Never pipe bundle text into `context align validate`.
50
-
51
- If `source-bundle` omits text for budget, `read_scope_complete: false`, `page.has_more: true`, or the final `source-bundle:end` annotation is missing, run its `next_action.command` before authoring.
52
-
53
- Read evidence through semantic CLI views, not shell parsing. Follow `page.next_command` for pagination. If the command contains `--read-cursor`, treat it as opaque continuation state and run it exactly; do not replace it with hand-written `--source`, `--heading`, `--window`, or `--range` selectors. Use `--source`, `--heading`, `--window`, `--range`, and `--token-budget` as view filters only. `--unwrap` removes workflow metadata; it does not expand a compact view into full detail.
54
-
55
- If a blocks view returns `align-blocks-read-incomplete`, `page.has_more`, or `truncated: true`, treat that response as a partial read. Do not finalize source-wide ownership or dense planned Sections from source-mapping/headings alone; continue the current detail view only when `page.next_command` is explicitly needed, otherwise return to the read-plan/source-bundle continuation.
56
-
57
- ### Step 3 — Reuse Existing Knowledge
58
-
59
- 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.
60
-
61
- 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.
62
-
63
- ### Step 4 — Classify Semantic Structure
64
-
65
- Apply `references/gates.md` before authoring Nodes: classify Node type in order (`action` scale + process evidence, then concrete/term `entity`, then child-bearing `domain`), reject fake Entities only when at least two suspicious signals match, keep `term` separate from concrete tags, and provide required gate evidence.
66
-
67
- Source titles and headings are ordinary evidence, not structural authority. Choose titles and summaries that fit the final Node type and the CLI-provided generation policy.
68
-
69
- For `node.title` and `node.summary`, follow `align-segments.generation_policy.language`. In Chinese workspaces, translate descriptive scaffold words such as architecture, strategy, lifecycle, overview, scheduling, high availability, and warning into Chinese while preserving product names, code identifiers, CLI flags, slugs, block_id tokens, and citation tokens exactly when needed. Do not copy an English source title into `node.title` merely because the source is English.
70
-
71
- Do not classify a broad architecture/system/方案 source as `domain` just because the title sounds like a scope. If it has writable Sections but no resolvable current/existing child Nodes, use an `entity` tag such as `system` or `application`; reserve `domain` for grouping child Nodes through `domain_gate.child_refs`.
72
-
73
- For large or batched payloads, use `references/density-profile.md` and `references/candidate-resolution.md` only when the CLI `next_action` asks for coarse-read or candidate-op payloads. Do not choose those stages yourself.
74
-
75
- ### Step 5 — Build The Payload Requested By `next_action`
76
-
77
- Use `next_action.input_schema` and the matching `context schema <name> --view minimal --format json` output to shape the payload. If the minimal view exposes `required`, `enums`, `minimal_example`, and `field_guidance`, treat it as the authoring contract; read the full schema only when those fields are insufficient for an edge case.
78
-
79
- For the default `align-structure-intent` path, produce one intent document with semantic Nodes, `section_groups[]`, `ownership_groups[]`, and edges. Let CLI generate `section_id` values and expand ownership groups into canonical defaults/exceptions. For long sources, do not hand-enumerate the largest ownership range; use one `{ source_id }` ownership group for the majority owner, then use `{ block_ids }` ownership groups for semantic exceptions. `block_ownership[]` is an advanced single-block patch path only when schema output or CLI diagnostics explicitly ask for it; it uses singular `block_id` and never `scope` or `block_ids`. Do not add `{ source_id, structural_role }` groups merely to mark front matter, navigation, placeholders, marker quotes, embed tags, or embedded assets as non-citation material; the source-wide default's automatic demotion handles those.
80
-
81
- Use only `block_ids[]` in `section_groups[]`. Do not invent heading/range/window selectors inside the intent. Treat source heading changes as section-planning signals: sibling sub-headings under a shared parent may stay in one Section when they form one coherent semantic topic; headings with no shared parent should usually split unless you intentionally want one Section to span them. The CLI reports cross-heading groups but does not rewrite your semantic grouping. If one semantic section spans non-contiguous citation-eligible blocks, align may accept the grouping, but finalized ownership will split it into compile draft-ready contiguous runs; hard citation-gap templates should stay separate. Every block you leave as `owned` or `shared` citation evidence must appear in some section group; otherwise reclassify it as `context_only` or `ignored`. If a no-write/navigation-only/placeholder-only Node is kept, set root-level `planned_sections: []` explicitly so the CLI knows this was intentional, and keep at least one supporting block as `context_only` with `visible_to` unless the Node already has owned/shared evidence or finalized graph support. `planned_sections` is a node field, not a `domain_gate` child. `ignored` is valid for skipped material or extra placeholder lines, but it does not create `context_sources` or unblock close by itself. If you skip a relation-only, navigation-only, or placeholder-only source after ruling out resolved Domain support and standalone retrieval or graph value, you still must classify every coverable block; use one source-wide `ownership_groups[]` rule with `ownership_role: "ignored"` or `context_only` instead of leaving the source absent from ownership. For Domain placeholders, put only resolved current/existing targets in `domain_gate.child_refs`; if all child refs are unresolved relation clues, use `child_refs: []` and leave the unresolved rows in pending-relation-refs. Do not turn a container placeholder into `entity[term]` unless the title itself is a useful atomic term.
82
-
83
- Emit `depends_on` edges only when cited source blocks explicitly say one Node consumes, requires, calls, is configured by, or is downstream of another Node as a prerequisite, capability provider, upstream input, runtime dependency, or data-flow source. Direction is consumer/downstream -> provider/upstream. Do not create `depends_on` for parent/child containment, `Related`/`See also` lists, sibling co-occurrence, shared table membership, name similarity, or a plain mention without a dependency predicate. `edges[].evidence_blocks[]` must include the block that states the dependency; if the relationship matters but evidence is missing, leave the edge out or add an unresolved question instead of guessing.
84
-
85
- 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 examples, comparison tables, Q&A, decisions, specs, warnings, or principles. Ordinary typical scenarios, case studies, and impact/result examples are `example`, not `incident`, unless the source is explicitly an outage, incident review, postmortem, or dated fault-handling timeline. 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.
86
-
87
- Canonical `align-structure-decision` is not a parallel authoring path. Use it only when `next_action.input_schema` explicitly asks for it or when auditing/repairing canonical output returned by the CLI.
88
-
89
- For coarse-read, candidate-op, patch, ownership, or rescan actions, follow the command and schema in the returned `next_action`. Do not carry old candidate-table, decision-patch, or full-tree payload shapes forward.
90
-
91
- ### Step 6 — Validate And Submit
92
-
93
- Before finalizing, run `context align validate --input - --format json` with the payload matching `next_action.input_schema`. If validate returns blocking diagnostics, repair the exact paths it reports and rerun validate. If validate returns a finalize `next_action`, submit the same validated payload to that command; do not copy compiled canonical JSON from validation output unless the CLI explicitly asks for canonical input.
94
-
95
- After finalize succeeds, do not rerun the finalize submit command to confirm success. Use returned `payloads.*.show_command` values, or `context workflow show --payload finalized-ownership --unwrap --format json`, for read-only confirmation; then continue with the returned `next_action.command`, normally `context compile scan --format json`.
96
-
97
- If finalize reports node reclassification hints, the submitted Node was changed by a semantic gate. Treat finalized ownership as the source of truth; status counts finalized Nodes, not submitted proposals.
98
-
99
- If any write is rejected, follow the returned `next_action` and `reason_code`. Do not retry by guessing direct/batched stages, forcing route bypasses, or editing workflow files.
100
-
101
- ### Step 7 — Self-verify
102
-
103
- - [ ] All writes followed top-level `next_action.command`. If not, return to **Step 1**.
104
- - [ ] Evidence was read through returned `next_action.command`, `how_to_explore[]`, or CLI schema/protocol commands only. If not, return to **Step 2**.
105
- - [ ] Node classification used the semantic gates in `references/gates.md`. If not, return to **Step 4**.
106
- - [ ] URL/reference ownership followed CLI diagnostics, not static prompt rules. If not, return to **Step 5**.
107
- - [ ] The requested align payload passed `context align validate --input - --format json` before finalize. If not, return to **Step 6**.
108
- - [ ] No raw, cache, knowledge, `/tmp`, host tool-results, or workflow scratch files were read or written with generic tools. If violated, restart from **Step 1**.
109
-
110
- </procedures>
@@ -1,60 +0,0 @@
1
- # Candidate Resolution Rules
2
-
3
- Use these rules after reading candidate ledger and aggregate payloads, before authoring the align payload requested by `next_action.input_schema`.
4
-
5
- ## Anomaly Signals
6
-
7
- `anomaly_signals[]` are mechanical warnings. Do not ignore them and do not treat them as recommendations.
8
-
9
- For each anomaly, choose one outcome and record the reasoning in either the next ledger op rationale, the final node summary/audit warning, or `unresolved[]`:
10
-
11
- | Outcome | Use When |
12
- |---|---|
13
- | `accept` | The anomaly points to a real correction. Apply a concrete op or final structure choice. |
14
- | `dismiss` | The warning is mechanically true but semantically harmless. Keep the candidate and state why. |
15
- | `unresolved` | The warning changes structure but the source evidence is insufficient. Add an unresolved question instead of guessing. |
16
-
17
- Known anomaly kinds:
18
-
19
- | Kind | Meaning | Required Handling |
20
- |---|---|---|
21
- | `missing_evidence` | An active candidate has no evidence block. | Add evidence, reject the candidate, or mark the structure unresolved. |
22
- | `ledger_churn` | A candidate was renamed, merged, superseded, or rejected during discovery. | Confirm the final title/slug/target or mark unresolved if the shape is still ambiguous. |
23
- | `duplicate_block` | The same evidence block appears more than once on a candidate. | Dedupe the evidence or explain why repeated evidence is harmless. |
24
- | `general_review_recommended` | The CLI collapsed more than eight anomalies. | Review the affected candidate broadly; do not finalize solely from aggregate ordering. |
25
-
26
- ## Label Hints
27
-
28
- For `merge_into`, `supersede`, and `reject`, include the visible label hint fields:
29
-
30
- - `source_label_hint` and `target_label_hint` for `merge_into`
31
- - `source_label_hint` and `target_label_hint` for `supersede`
32
- - `candidate_label_hint` for `reject`
33
-
34
- These hints are for audit and Agent DX. Copy them from ledger labels/titles when available. Do not invent a label that contradicts the visible candidate.
35
-
36
- ## `llm_slug_hint` And Refs
37
-
38
- Use `llm_slug_hint` as the stable reference inside one align payload when final slugs may be normalized by the CLI.
39
-
40
- Recommended pattern:
41
-
42
- ```yaml
43
- nodes:
44
- - llm_slug_hint: local:data-region
45
- slug: data-region
46
- node_type: entity
47
- tags: [term]
48
- - llm_slug_hint: local:failover
49
- contains_parent_ref: local:data-region
50
- edges:
51
- - edge_type: depends_on
52
- from_ref: local:failover
53
- to_ref: local:data-region
54
- sections:
55
- - owner: local:data-region
56
- block_ownership:
57
- - owners: [local:data-region]
58
- ```
59
-
60
- Refs may point to `llm_slug_hint` or final `slug`; prefer `*_ref` fields when a schema provides them. If the CLI rejects an unknown ref, use the top-level envelope diagnostics (`issues[].expected_shape.available_node_refs`, `diagnostics.*.available_node_refs`, or the returned repair view) and resubmit the corrected payload using the same `next_action.input_schema`. `agent_hints[]`, when present, is only a cutover mirror and must not be the source of truth.
@@ -1,16 +0,0 @@
1
- # Coarse Read Density Selection
2
-
3
- Use `density_profile` in `align-coarse-read` to describe how much structure the document needs before candidate discovery. This is a reading strategy, not a quality score.
4
-
5
- This reference applies only when the current envelope asks for `next_action.kind: "submit_coarse_read"`. In normal direct routes, read-plan/source-bundle already selected the evidence path; do not emit a `single_pass` coarse-read payload unless the CLI requested coarse-read.
6
-
7
- | Profile | Use When | Agent Behavior |
8
- |---|---|---|
9
- | `macro` | A long source has many headings, sections, or broad topic shifts. | Create section proposals around major headings and preserve document-level anchors so later passes do not flatten scope. |
10
- | `meso` | Default for normal product, design, or operational documents with several related sections. | Produce section proposals for meaningful local units and preserve evidence anchors. |
11
- | `micro` | The source is fragmented, note-like, or dense with short independent claims. | Keep section proposals narrow and avoid bundling unrelated blocks into one candidate. |
12
- | `single_pass` | The source is short enough that one read can safely discover all relevant structure. | Still emit the `align-coarse-read` artifact, but keep anchors minimal and avoid over-segmentation. |
13
-
14
- Treat Markdown heading changes as section-planning hints, not hard boundaries. Sibling sub-headings under a shared parent can remain in one `section_groups[]` entry when they form one coherent semantic topic for that parent. Headings with no shared parent should usually split unless you intentionally want one Section to span them. When a dense source has many headings, split by heading first, then merge adjacent or sibling groups only when the merged Section is still one coherent fact group.
15
-
16
- Do not emit kind/tag/content signals from coarse-read. Action/domain gates are decided later from the source-bundle evidence and schema gate fields, not from density metadata.