@c4a/context-cli 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/README.md +77 -12
  2. package/README.zh-CN.md +202 -0
  3. package/cli.js +74066 -45247
  4. package/docs/context-debug-event-v1.schema.json +29 -0
  5. package/docs/context-debug-replay-v1.schema.json +33 -0
  6. package/docs/debug-tracing.md +86 -0
  7. package/docs/quickstart.md +23 -5
  8. package/package.json +8 -3
  9. package/plugins/README.md +60 -118
  10. package/plugins/README_CN.md +51 -102
  11. package/plugins/VERSION +1 -1
  12. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  13. package/plugins/claude/commands/continue.md +61 -10
  14. package/plugins/claude/commands/init.md +26 -11
  15. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  16. package/plugins/codex/skills/continue/SKILL.md +61 -11
  17. package/plugins/codex/skills/init/SKILL.md +28 -14
  18. package/plugins/cursor/.cursor-plugin/plugin.json +2 -3
  19. package/plugins/cursor/README.md +2 -2
  20. package/plugins/cursor/commands/context-continue.md +61 -10
  21. package/plugins/cursor/commands/context-init.md +26 -11
  22. package/plugins/skills/context-continue/SKILL.md +61 -11
  23. package/plugins/skills/context-init/SKILL.md +28 -14
  24. package/providers/context/actions/accept-package-templates.yaml +5 -0
  25. package/providers/context/actions/align-next.yaml +6 -0
  26. package/providers/context/actions/apply-managed-review.yaml +5 -0
  27. package/providers/context/actions/apply-structure-confirmation.yaml +5 -0
  28. package/providers/context/actions/build-next.yaml +5 -0
  29. package/providers/context/actions/capture-next.yaml +5 -0
  30. package/providers/context/actions/close-approved-knowledge.yaml +5 -0
  31. package/providers/context/actions/compile-next.yaml +5 -0
  32. package/providers/context/actions/configure-code-extraction.yaml +5 -0
  33. package/providers/context/actions/configure-document-capture.yaml +5 -0
  34. package/providers/context/actions/configure-package-output.yaml +5 -0
  35. package/providers/context/actions/configure-prose-lifecycle.yaml +5 -0
  36. package/providers/context/actions/extract-next.yaml +5 -0
  37. package/providers/context/actions/inspect-document-classification.yaml +5 -0
  38. package/providers/context/actions/inspect-repository-recovery.yaml +6 -0
  39. package/providers/context/actions/inspect-review.yaml +5 -0
  40. package/providers/context/actions/inspect-structure.yaml +5 -0
  41. package/providers/context/actions/maintain-evidence.yaml +6 -0
  42. package/providers/context/actions/materialize-context-view.yaml +8 -0
  43. package/providers/context/actions/reconcile-review-identities.yaml +5 -0
  44. package/providers/context/actions/register-source-batch.yaml +7 -0
  45. package/providers/context/actions/repair-project-entry.yaml +5 -0
  46. package/providers/context/actions/repair-verification.yaml +5 -0
  47. package/providers/context/actions/repair-workspace-state.yaml +5 -0
  48. package/providers/context/actions/restore-repository-sources.yaml +7 -0
  49. package/providers/context/codes.yaml +41 -0
  50. package/providers/context/graphs/workspace.yaml +536 -0
  51. package/providers/context/manifest.json +700 -0
  52. package/providers/context/provider.yaml +12 -0
  53. package/providers/context/resources/diagnostics/projection-stale.md +13 -0
  54. package/providers/context/resources/diagnostics/verification.md +21 -0
  55. package/providers/context/resources/diagnostics/workspace-state.md +27 -0
  56. package/providers/context/resources/dialogue/code-extraction.md +34 -0
  57. package/providers/context/resources/dialogue/document-capture.md +29 -0
  58. package/providers/context/resources/dialogue/document-classification.md +33 -0
  59. package/providers/context/resources/dialogue/evidence-maintenance.md +26 -0
  60. package/providers/context/resources/dialogue/human-gates.md +34 -0
  61. package/providers/context/resources/dialogue/knowledge-review.md +27 -0
  62. package/providers/context/resources/dialogue/package-output.md +30 -0
  63. package/providers/context/resources/dialogue/repository-source-recovery.md +23 -0
  64. package/providers/context/resources/dialogue/source-boundary.md +29 -0
  65. package/providers/context/resources/dialogue/structure-confirmation.md +44 -0
  66. package/providers/context/resources/manuals/guides/lark-resources.md +121 -0
  67. package/providers/context/resources/manuals/guides/package-outputs.md +267 -0
  68. package/providers/context/resources/manuals/reference/package-templates.md +378 -0
  69. package/providers/context/resources/manuals/reference/project-api.md +825 -0
  70. package/providers/context/resources/manuals/reference/template-variables.md +248 -0
  71. package/providers/context/resources/procedures/close-and-build.md +23 -0
  72. package/providers/context/resources/procedures/code-extraction.md +50 -0
  73. package/providers/context/resources/procedures/document-capture.md +49 -0
  74. package/providers/context/resources/procedures/document-classification.md +22 -0
  75. package/providers/context/resources/procedures/evidence-maintenance.md +20 -0
  76. package/providers/context/resources/procedures/knowledge-review.md +34 -0
  77. package/providers/context/resources/procedures/package-output.md +37 -0
  78. package/providers/context/resources/procedures/project-configuration.md +21 -0
  79. package/providers/context/resources/procedures/prose-align.md +68 -0
  80. package/providers/context/resources/procedures/prose-compile.md +23 -0
  81. package/providers/context/resources/procedures/repository-source-recovery.md +43 -0
  82. package/providers/context/resources/procedures/source-boundary.md +48 -0
  83. package/{plugins/codex/skills/continue/references/internal-procedures/skill-source-scope/references/capture-source.md → providers/context/resources/procedures/source-capture-detailed.md} +54 -19
  84. package/providers/context/resources/procedures/verify-and-repair.md +31 -0
  85. package/{plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/candidate-resolution.md +17 -2
  86. package/{plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/density-profile.md +11 -0
  87. package/{plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/gates.md +13 -0
  88. package/{plugins/cursor/skills/skill-prose-align/references/internal-procedures → providers/context/resources/semantic/align}/structure-planning.md +62 -12
  89. package/providers/context/resources/semantic/compile/index.md +31 -0
  90. package/providers/context/resources/views/package-current.yaml +6 -0
  91. package/providers/context/resources/views/review-current.yaml +6 -0
  92. package/providers/context/resources/views/source-boundary.yaml +6 -0
  93. package/providers/context/resources/views/source-current.yaml +6 -0
  94. package/providers/context/resources/views/structure-current.yaml +6 -0
  95. package/providers/context/resources/views/verification-current.yaml +6 -0
  96. package/providers/context/resources/views/workspace-current.yaml +6 -0
  97. package/providers/context/schemas/evidence-maintenance-input.schema.json +30 -0
  98. package/providers/context/schemas/prose-structure-batch.schema.json +35 -0
  99. package/providers/context/schemas/repository-source-recovery.schema.json +40 -0
  100. package/providers/context/schemas/source-batch-input.schema.json +189 -0
  101. package/providers/context/scripts/render-context-view.mjs +21 -0
  102. package/plugins/claude/skills/skill-continue-workflow/SKILL.md +0 -235
  103. package/plugins/claude/skills/skill-init-workspace/SKILL.md +0 -74
  104. package/plugins/claude/skills/skill-package-output/SKILL.md +0 -180
  105. package/plugins/claude/skills/skill-prose-align/SKILL.md +0 -322
  106. package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  107. package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  108. package/plugins/claude/skills/skill-prose-compile/SKILL.md +0 -287
  109. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  110. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  111. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  112. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  113. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  114. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  115. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  116. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  117. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  118. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  119. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  120. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  121. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  122. package/plugins/claude/skills/skill-review-gate/SKILL.md +0 -138
  123. package/plugins/claude/skills/skill-source-scope/SKILL.md +0 -525
  124. package/plugins/claude/skills/skill-source-scope/references/capture-source.md +0 -201
  125. package/plugins/codex/skills/continue/references/internal-procedures/skill-continue-workflow.md +0 -235
  126. package/plugins/codex/skills/continue/references/internal-procedures/skill-init-workspace.md +0 -74
  127. package/plugins/codex/skills/continue/references/internal-procedures/skill-package-output.md +0 -180
  128. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  129. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  130. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  131. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  132. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align.md +0 -322
  133. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  134. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  135. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  136. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  137. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  138. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  139. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  140. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  141. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  142. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  143. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  144. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  145. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  146. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile.md +0 -287
  147. package/plugins/codex/skills/continue/references/internal-procedures/skill-review-gate.md +0 -138
  148. package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +0 -525
  149. package/plugins/codex/skills/init/references/internal-procedures/skill-continue-workflow.md +0 -235
  150. package/plugins/codex/skills/init/references/internal-procedures/skill-init-workspace.md +0 -74
  151. package/plugins/codex/skills/init/references/internal-procedures/skill-package-output.md +0 -180
  152. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  153. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  154. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  155. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align.md +0 -322
  156. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  157. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  158. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  159. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  160. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  161. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  162. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  163. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  164. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  165. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  166. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  167. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  168. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  169. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile.md +0 -287
  170. package/plugins/codex/skills/init/references/internal-procedures/skill-review-gate.md +0 -138
  171. package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
  172. package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +0 -525
  173. package/plugins/cursor/skills/skill-continue-workflow/SKILL.md +0 -235
  174. package/plugins/cursor/skills/skill-init-workspace/SKILL.md +0 -74
  175. package/plugins/cursor/skills/skill-package-output/SKILL.md +0 -180
  176. package/plugins/cursor/skills/skill-prose-align/SKILL.md +0 -322
  177. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  178. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  179. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  180. package/plugins/cursor/skills/skill-prose-compile/SKILL.md +0 -287
  181. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  182. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  183. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  184. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  185. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  186. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  187. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  188. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  189. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  190. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  191. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  192. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  193. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  194. package/plugins/cursor/skills/skill-review-gate/SKILL.md +0 -138
  195. package/plugins/cursor/skills/skill-source-scope/SKILL.md +0 -525
  196. package/plugins/cursor/skills/skill-source-scope/references/capture-source.md +0 -201
  197. package/plugins/skills/context-continue/references/internal-procedures/skill-continue-workflow.md +0 -235
  198. package/plugins/skills/context-continue/references/internal-procedures/skill-init-workspace.md +0 -74
  199. package/plugins/skills/context-continue/references/internal-procedures/skill-package-output.md +0 -180
  200. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  201. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  202. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  203. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  204. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align.md +0 -322
  205. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  206. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  207. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  208. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  209. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  210. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  211. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  212. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  213. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  214. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  215. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  216. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  217. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  218. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile.md +0 -287
  219. package/plugins/skills/context-continue/references/internal-procedures/skill-review-gate.md +0 -138
  220. package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
  221. package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +0 -525
  222. package/plugins/skills/context-init/references/internal-procedures/skill-continue-workflow.md +0 -235
  223. package/plugins/skills/context-init/references/internal-procedures/skill-init-workspace.md +0 -74
  224. package/plugins/skills/context-init/references/internal-procedures/skill-package-output.md +0 -180
  225. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  226. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  227. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  228. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  229. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align.md +0 -322
  230. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  231. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  232. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  233. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  234. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  235. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  236. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  237. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  238. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  239. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  240. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  241. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  242. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  243. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile.md +0 -287
  244. package/plugins/skills/context-init/references/internal-procedures/skill-review-gate.md +0 -138
  245. package/plugins/skills/context-init/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
  246. package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +0 -525
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "context",
3
3
  "description": "Maintain a project-local knowledge workspace through init and next-step agent guidance.",
4
- "version": "0.6.1",
4
+ "version": "0.6.3",
5
5
  "author": {
6
6
  "name": "c4a"
7
7
  },
@@ -6,27 +6,78 @@ allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
6
6
 
7
7
  ## Your Task
8
8
 
9
- Use this as the conversational entry for an existing Context workspace. There is
10
- no `context continue` CLI primitive; the command runs lower-level `context ...`
11
- commands only when the workspace state requires them.
9
+ Use this as the conversational entry for an existing Context workspace. There
10
+ is no `context continue` CLI primitive. Without explicit fully managed
11
+ authority, start with:
12
+
13
+ ```bash
14
+ context status --format json
15
+ ```
16
+
17
+ If the user explicitly asks to enable debugging, first run
18
+ `context debug enable`. It sets `package.json` `context.debug=true` and records
19
+ subsequent CLI and Agent Graph events only below `.tmp/context-runtime/debug/`.
20
+ Do not enable it proactively; tracing is not workflow authority or evidence.
21
+
22
+ When the user explicitly requests fully managed operation in this conversation,
23
+ start with the managed loop instead of a manual status/action cycle:
24
+
25
+ ```bash
26
+ context run --managed --until blocked-or-complete --format json
27
+ ```
28
+
29
+ Never persist or reuse that authority in another conversation. While the
30
+ request remains active, use `--managed` for every resumed status evaluation;
31
+ stop using it when the conversation ends or the user revokes it.
12
32
 
13
33
  If the user is starting a new workspace or a new batch from a raw repository
14
34
  root, do not run `context status` first. Use the public Context init entry or
15
35
  `context init` to create the workspace, complete the init setup command, then
16
36
  return here from the initialized workspace.
17
37
 
18
- If `context status` reports `workspace-not-found` and points at a configured
19
- `context.workspaceDir`, do not keep working from the host repository root. Enter
20
- that workspace when it exists, or initialize it through the init workflow after
21
- confirming with the user.
38
+ The managed loop is the default entry for an explicitly managed conversation,
39
+ not an optional optimization. Pass an additional `--authority` only when the user explicitly granted that
40
+ non-managed authority in this conversation. This loop executes only one
41
+ revision-bound command at a time and re-evaluates after every receipt. It stops
42
+ before read-only interpretation, project configuration, unresolved authority,
43
+ diagnostics, or a non-unique command plan. On stop, resume from the returned
44
+ `workflow.current`; do not derive a command from earlier steps.
22
45
 
23
46
  Language policy: explain, ask, confirm, and summarize in the user's current
24
47
  conversation language. Keep CLI commands, flags, paths, ids, status enum values,
25
48
  JSONL payload keys, `source_ref` values, and copied CLI output tokens unchanged.
26
49
 
27
- Use the internal `context:skill-continue-workflow` procedure end to end. It owns the
28
- status loop, safe mechanical next steps, source/scope gate, review gate, package
29
- gate, and final report rules.
50
+ Treat `workflow.current` as the current-step authority:
51
+
52
+ 1. Read every `resources.required` item whose `read_state` is
53
+ `read-required`. Read a `path` directly; for a resource with `command`,
54
+ execute that command and read the returned file. Keep read receipts only in
55
+ the current conversation and pass the merged receipt set back with
56
+ `context status --resource-receipts @<file>`; an unchanged static digest or
57
+ matching dynamic Route revision then returns `read_state: current`.
58
+ Materializing a resource is not a read: use the returned
59
+ `after_read_receipts` only after reading the complete returned file. A
60
+ `context.source-body/*` resource is the complete captured Markdown body;
61
+ source indexes and heading metadata never replace it. The exact
62
+ `resources.after_read.command` returns the re-evaluated `workflow.current`;
63
+ continue from that response without an additional status call.
64
+ 2. At a Gate, keep conditional context phase-local. An `inspection_action`
65
+ Skill or Schema is read only when performing that pre-decision inspection;
66
+ a `resolution_action` Skill or Schema is read only after the user confirms
67
+ the Gate. Neither replaces ordinary `resources.required`.
68
+ 3. Execute only `commands` returned by the Route, preserving revision and
69
+ authority flags exactly. A command marked `after-human-confirmation` must
70
+ wait for the current Gate decision. Run a command whose
71
+ `execution.target` is `agent-host` as a top-level host action with the
72
+ host's external and credential access, not inside a restricted child
73
+ sandbox. Request host approval when required; never weaken credential
74
+ storage as a workaround.
75
+ 4. If `configuration` is present, edit only the named project file using the
76
+ selected resources as its contract.
77
+ 5. After every action or configuration change, run status again. The managed
78
+ `--until` loop performs this re-evaluation internally. A phase-local
79
+ `next_action` can continue that operation but never replaces the workspace
80
+ Route.
30
81
 
31
82
  Do not infer repo sources, extraction scope, review decisions, or package output
32
83
  choices from surrounding files. Do not call source-repo operations such as
@@ -1,21 +1,36 @@
1
1
  ---
2
2
  description: "Initialize a Context knowledge workspace."
3
- argument-hint: "[project-dir] [--name <name>]"
3
+ argument-hint: "[project-dir] [--name <name>] [--language en|zh-CN] [--debug]"
4
4
  allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
5
5
  ---
6
6
 
7
7
  ## Your Task
8
8
 
9
- Initialize a Context workspace with the global CLI, then continue only through
10
- safe mechanical setup steps until the first human decision gate.
9
+ Initialize a Context workspace with the global CLI, complete the returned setup
10
+ step, then hand control to the current workflow route.
11
11
 
12
- Language policy: explain, ask, confirm, and summarize in the user's current
13
- conversation language. Keep CLI commands, flags, file paths, package names,
14
- enum values, payload keys, and copied CLI output tokens unchanged.
12
+ Use the user's language for conversation. Keep command and payload tokens
13
+ unchanged.
15
14
 
16
- Use the internal `context:skill-init-workspace` procedure end to end. It owns
17
- the `context init` invocation, dependency install follow-up, generated
18
- `AGENTS.md` handoff, status handoff, and stop conditions.
15
+ Run `context init [project-dir] [--name <name>] --language <language>`. Use the
16
+ user's explicit language choice when present; otherwise pass `zh-CN` for a
17
+ Chinese conversation and `en` for an English conversation. This explicit CLI
18
+ value controls generated workspace instructions and starter templates. Never
19
+ substitute `.` when `project-dir` was omitted; the default is `context/`. Use
20
+ `--dev` only for an explicitly requested local-link test.
21
+ Add `--debug` only when the user explicitly asks to trace this workspace. Debug
22
+ mode is otherwise off by default.
19
23
 
20
- Do not add extra project-local agent setup. Do not infer repo sources or
21
- extraction scope from the surrounding monorepo after setup.
24
+ If init reports `init-target-nonempty`, explain that existing files would share
25
+ the workspace root. Run the returned `--allow-nonempty` command only after
26
+ explicit confirmation.
27
+
28
+ Execute the returned setup command, enter the project root, and read its
29
+ generated `AGENTS.md`. Then run `context status --format json`, adding
30
+ `--managed` only for fully managed operation explicitly authorized in this
31
+ conversation. Treat `workflow.current` as authoritative: read its required
32
+ resources, execute only exact commands, honor unresolved human gates, and
33
+ reevaluate status after each action.
34
+
35
+ Do not add extra project-local agent setup or infer sources from the surrounding
36
+ monorepo.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "context",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "description": "Maintain a project-local knowledge workspace through init and next-step agent guidance.",
5
5
  "author": {
6
6
  "name": "c4a"
@@ -18,7 +18,7 @@
18
18
  "skills": "./skills/",
19
19
  "interface": {
20
20
  "displayName": "C4A Context",
21
- "shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.6.1",
21
+ "shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.6.3",
22
22
  "longDescription": "Create a Context workspace and use agent-guided next steps to register sources, run extraction, review candidates, build package outputs, and verify health without silently mutating source repositories.",
23
23
  "developerName": "c4a",
24
24
  "category": "Productivity",
@@ -13,33 +13,83 @@ Public Context entry for agents that expose skills instead of slash commands.
13
13
  - Public entry: `continue`
14
14
  - Host command names are installation-specific; use the command or skill surfaced by the current host instead of deriving a filesystem path from an example name.
15
15
  - CLI primitive prefix: `context ...`
16
- - Internal procedures live under `references/internal-procedures/`; read each referenced file in full before following that step.
17
16
 
18
17
  ---
19
18
 
20
19
  ## Workflow
21
20
 
22
- Use this as the conversational entry for an existing Context workspace. There is
23
- no `context continue` CLI primitive; the command runs lower-level `context ...`
24
- commands only when the workspace state requires them.
21
+ Use this as the conversational entry for an existing Context workspace. There
22
+ is no `context continue` CLI primitive. Without explicit fully managed
23
+ authority, start with:
24
+
25
+ ```bash
26
+ context status --format json
27
+ ```
28
+
29
+ If the user explicitly asks to enable debugging, first run
30
+ `context debug enable`. It sets `package.json` `context.debug=true` and records
31
+ subsequent CLI and Agent Graph events only below `.tmp/context-runtime/debug/`.
32
+ Do not enable it proactively; tracing is not workflow authority or evidence.
33
+
34
+ When the user explicitly requests fully managed operation in this conversation,
35
+ start with the managed loop instead of a manual status/action cycle:
36
+
37
+ ```bash
38
+ context run --managed --until blocked-or-complete --format json
39
+ ```
40
+
41
+ Never persist or reuse that authority in another conversation. While the
42
+ request remains active, use `--managed` for every resumed status evaluation;
43
+ stop using it when the conversation ends or the user revokes it.
25
44
 
26
45
  If the user is starting a new workspace or a new batch from a raw repository
27
46
  root, do not run `context status` first. Use the public Context init entry or
28
47
  `context init` to create the workspace, complete the init setup command, then
29
48
  return here from the initialized workspace.
30
49
 
31
- If `context status` reports `workspace-not-found` and points at a configured
32
- `context.workspaceDir`, do not keep working from the host repository root. Enter
33
- that workspace when it exists, or initialize it through the init workflow after
34
- confirming with the user.
50
+ The managed loop is the default entry for an explicitly managed conversation,
51
+ not an optional optimization. Pass an additional `--authority` only when the user explicitly granted that
52
+ non-managed authority in this conversation. This loop executes only one
53
+ revision-bound command at a time and re-evaluates after every receipt. It stops
54
+ before read-only interpretation, project configuration, unresolved authority,
55
+ diagnostics, or a non-unique command plan. On stop, resume from the returned
56
+ `workflow.current`; do not derive a command from earlier steps.
35
57
 
36
58
  Language policy: explain, ask, confirm, and summarize in the user's current
37
59
  conversation language. Keep CLI commands, flags, paths, ids, status enum values,
38
60
  JSONL payload keys, `source_ref` values, and copied CLI output tokens unchanged.
39
61
 
40
- Use the procedure in `references/internal-procedures/skill-continue-workflow.md` end to end. It owns the
41
- status loop, safe mechanical next steps, source/scope gate, review gate, package
42
- gate, and final report rules.
62
+ Treat `workflow.current` as the current-step authority:
63
+
64
+ 1. Read every `resources.required` item whose `read_state` is
65
+ `read-required`. Read a `path` directly; for a resource with `command`,
66
+ execute that command and read the returned file. Keep read receipts only in
67
+ the current conversation and pass the merged receipt set back with
68
+ `context status --resource-receipts @<file>`; an unchanged static digest or
69
+ matching dynamic Route revision then returns `read_state: current`.
70
+ Materializing a resource is not a read: use the returned
71
+ `after_read_receipts` only after reading the complete returned file. A
72
+ `context.source-body/*` resource is the complete captured Markdown body;
73
+ source indexes and heading metadata never replace it. The exact
74
+ `resources.after_read.command` returns the re-evaluated `workflow.current`;
75
+ continue from that response without an additional status call.
76
+ 2. At a Gate, keep conditional context phase-local. An `inspection_action`
77
+ Skill or Schema is read only when performing that pre-decision inspection;
78
+ a `resolution_action` Skill or Schema is read only after the user confirms
79
+ the Gate. Neither replaces ordinary `resources.required`.
80
+ 3. Execute only `commands` returned by the Route, preserving revision and
81
+ authority flags exactly. A command marked `after-human-confirmation` must
82
+ wait for the current Gate decision. Run a command whose
83
+ `execution.target` is `agent-host` as a top-level host action with the
84
+ host's external and credential access, not inside a restricted child
85
+ sandbox. Request host approval when required; never weaken credential
86
+ storage as a workaround.
87
+ 4. If `configuration` is present, edit only the named project file using the
88
+ selected resources as its contract.
89
+ 5. After every action or configuration change, run status again. The managed
90
+ `--until` loop performs this re-evaluation internally. A phase-local
91
+ `next_action` can continue that operation but never replaces the workspace
92
+ Route.
43
93
 
44
94
  Do not infer repo sources, extraction scope, review decisions, or package output
45
95
  choices from surrounding files. Do not call source-repo operations such as
@@ -13,22 +13,36 @@ Public Context entry for agents that expose skills instead of slash commands.
13
13
  - Public entry: `init`
14
14
  - Host command names are installation-specific; use the command or skill surfaced by the current host instead of deriving a filesystem path from an example name.
15
15
  - CLI primitive prefix: `context ...`
16
- - Internal procedures live under `references/internal-procedures/`; read each referenced file in full before following that step.
17
16
 
18
17
  ---
19
18
 
20
19
  ## Workflow
21
20
 
22
- Initialize a Context workspace with the global CLI, then continue only through
23
- safe mechanical setup steps until the first human decision gate.
24
-
25
- Language policy: explain, ask, confirm, and summarize in the user's current
26
- conversation language. Keep CLI commands, flags, file paths, package names,
27
- enum values, payload keys, and copied CLI output tokens unchanged.
28
-
29
- Use the procedure in `references/internal-procedures/skill-init-workspace.md` end to end. It owns
30
- the `context init` invocation, dependency install follow-up, generated
31
- `AGENTS.md` handoff, status handoff, and stop conditions.
32
-
33
- Do not add extra project-local agent setup. Do not infer repo sources or
34
- extraction scope from the surrounding monorepo after setup.
21
+ Initialize a Context workspace with the global CLI, complete the returned setup
22
+ step, then hand control to the current workflow route.
23
+
24
+ Use the user's language for conversation. Keep command and payload tokens
25
+ unchanged.
26
+
27
+ Run `context init [project-dir] [--name <name>] --language <language>`. Use the
28
+ user's explicit language choice when present; otherwise pass `zh-CN` for a
29
+ Chinese conversation and `en` for an English conversation. This explicit CLI
30
+ value controls generated workspace instructions and starter templates. Never
31
+ substitute `.` when `project-dir` was omitted; the default is `context/`. Use
32
+ `--dev` only for an explicitly requested local-link test.
33
+ Add `--debug` only when the user explicitly asks to trace this workspace. Debug
34
+ mode is otherwise off by default.
35
+
36
+ If init reports `init-target-nonempty`, explain that existing files would share
37
+ the workspace root. Run the returned `--allow-nonempty` command only after
38
+ explicit confirmation.
39
+
40
+ Execute the returned setup command, enter the project root, and read its
41
+ generated `AGENTS.md`. Then run `context status --format json`, adding
42
+ `--managed` only for fully managed operation explicitly authorized in this
43
+ conversation. Treat `workflow.current` as authoritative: read its required
44
+ resources, execute only exact commands, honor unresolved human gates, and
45
+ reevaluate status after each action.
46
+
47
+ Do not add extra project-local agent setup or infer sources from the surrounding
48
+ monorepo.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "context",
3
3
  "displayName": "C4A Context",
4
- "version": "0.6.1",
4
+ "version": "0.6.3",
5
5
  "description": "Maintain a project-local knowledge workspace through init and next-step agent guidance.",
6
6
  "author": {
7
7
  "name": "Context4AI",
@@ -24,6 +24,5 @@
24
24
  "agent-skills",
25
25
  "citations"
26
26
  ],
27
- "commands": "./commands/",
28
- "skills": "./skills/"
27
+ "commands": "./commands/"
29
28
  }
@@ -6,8 +6,8 @@ Edit `packages/context-cli/plugin/` and rerun the build instead.
6
6
 
7
7
  Install shape:
8
8
 
9
- - Marketplace/GitHub plugin shape: this directory is a plugin root with `.cursor-plugin/plugin.json`, `commands/`, and `skills/`.
9
+ - Marketplace/GitHub plugin shape: this directory is a plugin root with `.cursor-plugin/plugin.json` and `commands/`.
10
10
  - User entries are under `commands/`; Cursor command files are prefixed as `context-*` to avoid global slash-command collisions.
11
11
  - Local plugin fallback: symlink or copy this directory to `~/.cursor/plugins/local/context/` only when Marketplace import is unavailable.
12
12
 
13
- Do not copy these files into `.cursor/skills/` as the main install path. Cursor Marketplace installs this plugin root directly.
13
+ Cursor Marketplace installs this plugin root directly.
@@ -10,27 +10,78 @@ Continue the Context workflow from the current workspace state.
10
10
 
11
11
  ## Workflow
12
12
 
13
- Use this as the conversational entry for an existing Context workspace. There is
14
- no `context continue` CLI primitive; the command runs lower-level `context ...`
15
- commands only when the workspace state requires them.
13
+ Use this as the conversational entry for an existing Context workspace. There
14
+ is no `context continue` CLI primitive. Without explicit fully managed
15
+ authority, start with:
16
+
17
+ ```bash
18
+ context status --format json
19
+ ```
20
+
21
+ If the user explicitly asks to enable debugging, first run
22
+ `context debug enable`. It sets `package.json` `context.debug=true` and records
23
+ subsequent CLI and Agent Graph events only below `.tmp/context-runtime/debug/`.
24
+ Do not enable it proactively; tracing is not workflow authority or evidence.
25
+
26
+ When the user explicitly requests fully managed operation in this conversation,
27
+ start with the managed loop instead of a manual status/action cycle:
28
+
29
+ ```bash
30
+ context run --managed --until blocked-or-complete --format json
31
+ ```
32
+
33
+ Never persist or reuse that authority in another conversation. While the
34
+ request remains active, use `--managed` for every resumed status evaluation;
35
+ stop using it when the conversation ends or the user revokes it.
16
36
 
17
37
  If the user is starting a new workspace or a new batch from a raw repository
18
38
  root, do not run `context status` first. Use the public Context init entry or
19
39
  `context init` to create the workspace, complete the init setup command, then
20
40
  return here from the initialized workspace.
21
41
 
22
- If `context status` reports `workspace-not-found` and points at a configured
23
- `context.workspaceDir`, do not keep working from the host repository root. Enter
24
- that workspace when it exists, or initialize it through the init workflow after
25
- confirming with the user.
42
+ The managed loop is the default entry for an explicitly managed conversation,
43
+ not an optional optimization. Pass an additional `--authority` only when the user explicitly granted that
44
+ non-managed authority in this conversation. This loop executes only one
45
+ revision-bound command at a time and re-evaluates after every receipt. It stops
46
+ before read-only interpretation, project configuration, unresolved authority,
47
+ diagnostics, or a non-unique command plan. On stop, resume from the returned
48
+ `workflow.current`; do not derive a command from earlier steps.
26
49
 
27
50
  Language policy: explain, ask, confirm, and summarize in the user's current
28
51
  conversation language. Keep CLI commands, flags, paths, ids, status enum values,
29
52
  JSONL payload keys, `source_ref` values, and copied CLI output tokens unchanged.
30
53
 
31
- Use the procedure in `../skills/skill-continue-workflow/SKILL.md` end to end. It owns the
32
- status loop, safe mechanical next steps, source/scope gate, review gate, package
33
- gate, and final report rules.
54
+ Treat `workflow.current` as the current-step authority:
55
+
56
+ 1. Read every `resources.required` item whose `read_state` is
57
+ `read-required`. Read a `path` directly; for a resource with `command`,
58
+ execute that command and read the returned file. Keep read receipts only in
59
+ the current conversation and pass the merged receipt set back with
60
+ `context status --resource-receipts @<file>`; an unchanged static digest or
61
+ matching dynamic Route revision then returns `read_state: current`.
62
+ Materializing a resource is not a read: use the returned
63
+ `after_read_receipts` only after reading the complete returned file. A
64
+ `context.source-body/*` resource is the complete captured Markdown body;
65
+ source indexes and heading metadata never replace it. The exact
66
+ `resources.after_read.command` returns the re-evaluated `workflow.current`;
67
+ continue from that response without an additional status call.
68
+ 2. At a Gate, keep conditional context phase-local. An `inspection_action`
69
+ Skill or Schema is read only when performing that pre-decision inspection;
70
+ a `resolution_action` Skill or Schema is read only after the user confirms
71
+ the Gate. Neither replaces ordinary `resources.required`.
72
+ 3. Execute only `commands` returned by the Route, preserving revision and
73
+ authority flags exactly. A command marked `after-human-confirmation` must
74
+ wait for the current Gate decision. Run a command whose
75
+ `execution.target` is `agent-host` as a top-level host action with the
76
+ host's external and credential access, not inside a restricted child
77
+ sandbox. Request host approval when required; never weaken credential
78
+ storage as a workaround.
79
+ 4. If `configuration` is present, edit only the named project file using the
80
+ selected resources as its contract.
81
+ 5. After every action or configuration change, run status again. The managed
82
+ `--until` loop performs this re-evaluation internally. A phase-local
83
+ `next_action` can continue that operation but never replaces the workspace
84
+ Route.
34
85
 
35
86
  Do not infer repo sources, extraction scope, review decisions, or package output
36
87
  choices from surrounding files. Do not call source-repo operations such as
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: "Initialize a Context knowledge workspace."
3
- argument-hint: "[project-dir] [--name <name>]"
3
+ argument-hint: "[project-dir] [--name <name>] [--language en|zh-CN] [--debug]"
4
4
  allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
5
5
  ---
6
6
 
@@ -10,16 +10,31 @@ Initialize a Context knowledge workspace.
10
10
 
11
11
  ## Workflow
12
12
 
13
- Initialize a Context workspace with the global CLI, then continue only through
14
- safe mechanical setup steps until the first human decision gate.
13
+ Initialize a Context workspace with the global CLI, complete the returned setup
14
+ step, then hand control to the current workflow route.
15
15
 
16
- Language policy: explain, ask, confirm, and summarize in the user's current
17
- conversation language. Keep CLI commands, flags, file paths, package names,
18
- enum values, payload keys, and copied CLI output tokens unchanged.
16
+ Use the user's language for conversation. Keep command and payload tokens
17
+ unchanged.
19
18
 
20
- Use the procedure in `../skills/skill-init-workspace/SKILL.md` end to end. It owns
21
- the `context init` invocation, dependency install follow-up, generated
22
- `AGENTS.md` handoff, status handoff, and stop conditions.
19
+ Run `context init [project-dir] [--name <name>] --language <language>`. Use the
20
+ user's explicit language choice when present; otherwise pass `zh-CN` for a
21
+ Chinese conversation and `en` for an English conversation. This explicit CLI
22
+ value controls generated workspace instructions and starter templates. Never
23
+ substitute `.` when `project-dir` was omitted; the default is `context/`. Use
24
+ `--dev` only for an explicitly requested local-link test.
25
+ Add `--debug` only when the user explicitly asks to trace this workspace. Debug
26
+ mode is otherwise off by default.
23
27
 
24
- Do not add extra project-local agent setup. Do not infer repo sources or
25
- extraction scope from the surrounding monorepo after setup.
28
+ If init reports `init-target-nonempty`, explain that existing files would share
29
+ the workspace root. Run the returned `--allow-nonempty` command only after
30
+ explicit confirmation.
31
+
32
+ Execute the returned setup command, enter the project root, and read its
33
+ generated `AGENTS.md`. Then run `context status --format json`, adding
34
+ `--managed` only for fully managed operation explicitly authorized in this
35
+ conversation. Treat `workflow.current` as authoritative: read its required
36
+ resources, execute only exact commands, honor unresolved human gates, and
37
+ reevaluate status after each action.
38
+
39
+ Do not add extra project-local agent setup or infer sources from the surrounding
40
+ monorepo.
@@ -13,33 +13,83 @@ Public Context entry for agents that expose skills instead of slash commands.
13
13
  - Public entry: `context-continue`
14
14
  - Host command names are installation-specific; use the command or skill surfaced by the current host instead of deriving a filesystem path from an example name.
15
15
  - CLI primitive prefix: `context ...`
16
- - Internal procedures live under `references/internal-procedures/`; read each referenced file in full before following that step.
17
16
 
18
17
  ---
19
18
 
20
19
  ## Workflow
21
20
 
22
- Use this as the conversational entry for an existing Context workspace. There is
23
- no `context continue` CLI primitive; the command runs lower-level `context ...`
24
- commands only when the workspace state requires them.
21
+ Use this as the conversational entry for an existing Context workspace. There
22
+ is no `context continue` CLI primitive. Without explicit fully managed
23
+ authority, start with:
24
+
25
+ ```bash
26
+ context status --format json
27
+ ```
28
+
29
+ If the user explicitly asks to enable debugging, first run
30
+ `context debug enable`. It sets `package.json` `context.debug=true` and records
31
+ subsequent CLI and Agent Graph events only below `.tmp/context-runtime/debug/`.
32
+ Do not enable it proactively; tracing is not workflow authority or evidence.
33
+
34
+ When the user explicitly requests fully managed operation in this conversation,
35
+ start with the managed loop instead of a manual status/action cycle:
36
+
37
+ ```bash
38
+ context run --managed --until blocked-or-complete --format json
39
+ ```
40
+
41
+ Never persist or reuse that authority in another conversation. While the
42
+ request remains active, use `--managed` for every resumed status evaluation;
43
+ stop using it when the conversation ends or the user revokes it.
25
44
 
26
45
  If the user is starting a new workspace or a new batch from a raw repository
27
46
  root, do not run `context status` first. Use the public Context init entry or
28
47
  `context init` to create the workspace, complete the init setup command, then
29
48
  return here from the initialized workspace.
30
49
 
31
- If `context status` reports `workspace-not-found` and points at a configured
32
- `context.workspaceDir`, do not keep working from the host repository root. Enter
33
- that workspace when it exists, or initialize it through the init workflow after
34
- confirming with the user.
50
+ The managed loop is the default entry for an explicitly managed conversation,
51
+ not an optional optimization. Pass an additional `--authority` only when the user explicitly granted that
52
+ non-managed authority in this conversation. This loop executes only one
53
+ revision-bound command at a time and re-evaluates after every receipt. It stops
54
+ before read-only interpretation, project configuration, unresolved authority,
55
+ diagnostics, or a non-unique command plan. On stop, resume from the returned
56
+ `workflow.current`; do not derive a command from earlier steps.
35
57
 
36
58
  Language policy: explain, ask, confirm, and summarize in the user's current
37
59
  conversation language. Keep CLI commands, flags, paths, ids, status enum values,
38
60
  JSONL payload keys, `source_ref` values, and copied CLI output tokens unchanged.
39
61
 
40
- Use the procedure in `references/internal-procedures/skill-continue-workflow.md` end to end. It owns the
41
- status loop, safe mechanical next steps, source/scope gate, review gate, package
42
- gate, and final report rules.
62
+ Treat `workflow.current` as the current-step authority:
63
+
64
+ 1. Read every `resources.required` item whose `read_state` is
65
+ `read-required`. Read a `path` directly; for a resource with `command`,
66
+ execute that command and read the returned file. Keep read receipts only in
67
+ the current conversation and pass the merged receipt set back with
68
+ `context status --resource-receipts @<file>`; an unchanged static digest or
69
+ matching dynamic Route revision then returns `read_state: current`.
70
+ Materializing a resource is not a read: use the returned
71
+ `after_read_receipts` only after reading the complete returned file. A
72
+ `context.source-body/*` resource is the complete captured Markdown body;
73
+ source indexes and heading metadata never replace it. The exact
74
+ `resources.after_read.command` returns the re-evaluated `workflow.current`;
75
+ continue from that response without an additional status call.
76
+ 2. At a Gate, keep conditional context phase-local. An `inspection_action`
77
+ Skill or Schema is read only when performing that pre-decision inspection;
78
+ a `resolution_action` Skill or Schema is read only after the user confirms
79
+ the Gate. Neither replaces ordinary `resources.required`.
80
+ 3. Execute only `commands` returned by the Route, preserving revision and
81
+ authority flags exactly. A command marked `after-human-confirmation` must
82
+ wait for the current Gate decision. Run a command whose
83
+ `execution.target` is `agent-host` as a top-level host action with the
84
+ host's external and credential access, not inside a restricted child
85
+ sandbox. Request host approval when required; never weaken credential
86
+ storage as a workaround.
87
+ 4. If `configuration` is present, edit only the named project file using the
88
+ selected resources as its contract.
89
+ 5. After every action or configuration change, run status again. The managed
90
+ `--until` loop performs this re-evaluation internally. A phase-local
91
+ `next_action` can continue that operation but never replaces the workspace
92
+ Route.
43
93
 
44
94
  Do not infer repo sources, extraction scope, review decisions, or package output
45
95
  choices from surrounding files. Do not call source-repo operations such as