@c4a/context-cli 0.6.1 → 0.6.2

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 (236) hide show
  1. package/README.md +48 -10
  2. package/README.zh-CN.md +176 -0
  3. package/cli.js +60700 -35477
  4. package/docs/quickstart.md +23 -5
  5. package/package.json +4 -2
  6. package/plugins/README.md +60 -118
  7. package/plugins/README_CN.md +51 -102
  8. package/plugins/VERSION +1 -1
  9. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  10. package/plugins/claude/commands/continue.md +56 -10
  11. package/plugins/claude/commands/init.md +24 -11
  12. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  13. package/plugins/codex/skills/continue/SKILL.md +56 -11
  14. package/plugins/codex/skills/init/SKILL.md +23 -11
  15. package/plugins/cursor/.cursor-plugin/plugin.json +2 -3
  16. package/plugins/cursor/README.md +2 -2
  17. package/plugins/cursor/commands/context-continue.md +56 -10
  18. package/plugins/cursor/commands/context-init.md +24 -11
  19. package/plugins/skills/context-continue/SKILL.md +56 -11
  20. package/plugins/skills/context-init/SKILL.md +23 -11
  21. package/providers/context/actions/accept-package-templates.yaml +5 -0
  22. package/providers/context/actions/align-next.yaml +6 -0
  23. package/providers/context/actions/apply-managed-review.yaml +5 -0
  24. package/providers/context/actions/apply-structure-confirmation.yaml +5 -0
  25. package/providers/context/actions/build-next.yaml +5 -0
  26. package/providers/context/actions/capture-next.yaml +5 -0
  27. package/providers/context/actions/close-approved-knowledge.yaml +5 -0
  28. package/providers/context/actions/compile-next.yaml +5 -0
  29. package/providers/context/actions/configure-code-extraction.yaml +5 -0
  30. package/providers/context/actions/configure-document-capture.yaml +5 -0
  31. package/providers/context/actions/configure-package-output.yaml +5 -0
  32. package/providers/context/actions/configure-prose-lifecycle.yaml +5 -0
  33. package/providers/context/actions/ensure-repository-sources.yaml +5 -0
  34. package/providers/context/actions/extract-next.yaml +5 -0
  35. package/providers/context/actions/inspect-document-classification.yaml +5 -0
  36. package/providers/context/actions/inspect-review.yaml +5 -0
  37. package/providers/context/actions/inspect-structure.yaml +5 -0
  38. package/providers/context/actions/maintain-evidence.yaml +6 -0
  39. package/providers/context/actions/materialize-context-view.yaml +8 -0
  40. package/providers/context/actions/register-source-batch.yaml +7 -0
  41. package/providers/context/actions/repair-project-entry.yaml +5 -0
  42. package/providers/context/actions/repair-verification.yaml +5 -0
  43. package/providers/context/actions/repair-workspace-state.yaml +5 -0
  44. package/providers/context/codes.yaml +40 -0
  45. package/providers/context/graphs/workspace.yaml +494 -0
  46. package/providers/context/manifest.json +637 -0
  47. package/providers/context/provider.yaml +12 -0
  48. package/providers/context/resources/diagnostics/projection-stale.md +13 -0
  49. package/providers/context/resources/diagnostics/verification.md +21 -0
  50. package/providers/context/resources/diagnostics/workspace-state.md +27 -0
  51. package/providers/context/resources/dialogue/code-extraction.md +34 -0
  52. package/providers/context/resources/dialogue/document-capture.md +29 -0
  53. package/providers/context/resources/dialogue/document-classification.md +33 -0
  54. package/providers/context/resources/dialogue/evidence-maintenance.md +26 -0
  55. package/providers/context/resources/dialogue/human-gates.md +34 -0
  56. package/providers/context/resources/dialogue/knowledge-review.md +27 -0
  57. package/providers/context/resources/dialogue/package-output.md +30 -0
  58. package/providers/context/resources/dialogue/source-boundary.md +29 -0
  59. package/providers/context/resources/dialogue/structure-confirmation.md +44 -0
  60. package/providers/context/resources/manuals/guides/package-outputs.md +259 -0
  61. package/providers/context/resources/manuals/reference/package-templates.md +378 -0
  62. package/providers/context/resources/manuals/reference/project-api.md +789 -0
  63. package/providers/context/resources/manuals/reference/template-variables.md +248 -0
  64. package/providers/context/resources/procedures/close-and-build.md +21 -0
  65. package/providers/context/resources/procedures/code-extraction.md +50 -0
  66. package/providers/context/resources/procedures/document-capture.md +45 -0
  67. package/providers/context/resources/procedures/document-classification.md +22 -0
  68. package/providers/context/resources/procedures/evidence-maintenance.md +20 -0
  69. package/providers/context/resources/procedures/knowledge-review.md +24 -0
  70. package/providers/context/resources/procedures/package-output.md +37 -0
  71. package/providers/context/resources/procedures/project-configuration.md +21 -0
  72. package/providers/context/resources/procedures/prose-align.md +68 -0
  73. package/providers/context/resources/procedures/prose-compile.md +23 -0
  74. package/providers/context/resources/procedures/source-boundary.md +48 -0
  75. package/{plugins/codex/skills/init/references/internal-procedures/skill-source-scope/references/capture-source.md → providers/context/resources/procedures/source-capture-detailed.md} +41 -19
  76. package/providers/context/resources/procedures/verify-and-repair.md +19 -0
  77. package/{plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/candidate-resolution.md +17 -2
  78. package/{plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/density-profile.md +11 -0
  79. 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
  80. package/{plugins/cursor/skills/skill-prose-align/references/internal-procedures → providers/context/resources/semantic/align}/structure-planning.md +62 -12
  81. package/providers/context/resources/semantic/compile/index.md +31 -0
  82. package/providers/context/resources/views/package-current.yaml +6 -0
  83. package/providers/context/resources/views/review-current.yaml +6 -0
  84. package/providers/context/resources/views/source-current.yaml +6 -0
  85. package/providers/context/resources/views/structure-current.yaml +6 -0
  86. package/providers/context/resources/views/verification-current.yaml +6 -0
  87. package/providers/context/resources/views/workspace-current.yaml +6 -0
  88. package/providers/context/schemas/evidence-maintenance-input.schema.json +30 -0
  89. package/providers/context/schemas/prose-structure-batch.schema.json +35 -0
  90. package/providers/context/schemas/source-batch-input.schema.json +189 -0
  91. package/providers/context/scripts/render-context-view.mjs +21 -0
  92. package/plugins/claude/skills/skill-continue-workflow/SKILL.md +0 -235
  93. package/plugins/claude/skills/skill-init-workspace/SKILL.md +0 -74
  94. package/plugins/claude/skills/skill-package-output/SKILL.md +0 -180
  95. package/plugins/claude/skills/skill-prose-align/SKILL.md +0 -322
  96. package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  97. package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  98. package/plugins/claude/skills/skill-prose-compile/SKILL.md +0 -287
  99. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  100. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  101. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  102. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  103. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  104. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  105. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  106. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  107. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  108. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  109. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  110. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  111. package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  112. package/plugins/claude/skills/skill-review-gate/SKILL.md +0 -138
  113. package/plugins/claude/skills/skill-source-scope/SKILL.md +0 -525
  114. package/plugins/claude/skills/skill-source-scope/references/capture-source.md +0 -201
  115. package/plugins/codex/skills/continue/references/internal-procedures/skill-continue-workflow.md +0 -235
  116. package/plugins/codex/skills/continue/references/internal-procedures/skill-init-workspace.md +0 -74
  117. package/plugins/codex/skills/continue/references/internal-procedures/skill-package-output.md +0 -180
  118. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  119. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  120. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  121. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  122. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align.md +0 -322
  123. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  124. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  125. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  126. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  127. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  128. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  129. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  130. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  131. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  132. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  133. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  134. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  135. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  136. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile.md +0 -287
  137. package/plugins/codex/skills/continue/references/internal-procedures/skill-review-gate.md +0 -138
  138. package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
  139. package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +0 -525
  140. package/plugins/codex/skills/init/references/internal-procedures/skill-continue-workflow.md +0 -235
  141. package/plugins/codex/skills/init/references/internal-procedures/skill-init-workspace.md +0 -74
  142. package/plugins/codex/skills/init/references/internal-procedures/skill-package-output.md +0 -180
  143. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  144. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  145. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  146. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align.md +0 -322
  147. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  148. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  149. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  150. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  151. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  152. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  153. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  154. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  155. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  156. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  157. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  158. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  159. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  160. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile.md +0 -287
  161. package/plugins/codex/skills/init/references/internal-procedures/skill-review-gate.md +0 -138
  162. package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +0 -525
  163. package/plugins/cursor/skills/skill-continue-workflow/SKILL.md +0 -235
  164. package/plugins/cursor/skills/skill-init-workspace/SKILL.md +0 -74
  165. package/plugins/cursor/skills/skill-package-output/SKILL.md +0 -180
  166. package/plugins/cursor/skills/skill-prose-align/SKILL.md +0 -322
  167. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  168. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  169. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  170. package/plugins/cursor/skills/skill-prose-compile/SKILL.md +0 -287
  171. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  172. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  173. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  174. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  175. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  176. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  177. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  178. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  179. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  180. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  181. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  182. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  183. package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  184. package/plugins/cursor/skills/skill-review-gate/SKILL.md +0 -138
  185. package/plugins/cursor/skills/skill-source-scope/SKILL.md +0 -525
  186. package/plugins/cursor/skills/skill-source-scope/references/capture-source.md +0 -201
  187. package/plugins/skills/context-continue/references/internal-procedures/skill-continue-workflow.md +0 -235
  188. package/plugins/skills/context-continue/references/internal-procedures/skill-init-workspace.md +0 -74
  189. package/plugins/skills/context-continue/references/internal-procedures/skill-package-output.md +0 -180
  190. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  191. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  192. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  193. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  194. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align.md +0 -322
  195. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  196. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  197. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  198. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  199. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  200. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  201. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  202. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  203. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  204. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  205. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  206. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  207. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  208. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile.md +0 -287
  209. package/plugins/skills/context-continue/references/internal-procedures/skill-review-gate.md +0 -138
  210. package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
  211. package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +0 -525
  212. package/plugins/skills/context-init/references/internal-procedures/skill-continue-workflow.md +0 -235
  213. package/plugins/skills/context-init/references/internal-procedures/skill-init-workspace.md +0 -74
  214. package/plugins/skills/context-init/references/internal-procedures/skill-package-output.md +0 -180
  215. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
  216. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
  217. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
  218. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
  219. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align.md +0 -322
  220. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
  221. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
  222. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
  223. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
  224. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
  225. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
  226. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
  227. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
  228. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
  229. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
  230. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
  231. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
  232. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
  233. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile.md +0 -287
  234. package/plugins/skills/context-init/references/internal-procedures/skill-review-gate.md +0 -138
  235. package/plugins/skills/context-init/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
  236. package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +0 -525
@@ -0,0 +1,21 @@
1
+ ---
2
+ id: diagnostic.verification
3
+ kind: diagnostic
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Verification diagnostics
8
+
9
+ Context reports one root diagnostic with counts and keeps derived findings in a
10
+ separate detail view. Codes are stable machine identifiers; this document gives
11
+ the shared recovery boundary.
12
+
13
+ Content or provenance failures require a new source-bound candidate or an
14
+ explicit evidence-maintenance decision. Projection-only failures can be
15
+ repaired by deterministic close. A warning does not become success by being
16
+ omitted from output.
17
+
18
+ `approved-source-orphaned` is a persistent warning produced only after an
19
+ explicit `keep-orphaned` decision. It records that the page remains usable by
20
+ policy while its original source document cannot be resolved. It does not
21
+ permit changed source content to bypass replacement Review.
@@ -0,0 +1,27 @@
1
+ ---
2
+ id: diagnostic.workspace-state
3
+ kind: diagnostic
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Invalid workspace state
8
+
9
+ This route means Context could observe the workspace but could not prove a
10
+ legal lifecycle action from its facts.
11
+
12
+ Read the root diagnostics and their structured details. Repair the named
13
+ project declaration or missing lifecycle artifact. Do not rerun completed
14
+ phases, edit generated `knowledge/structure.yaml`, or delete runtime state as a
15
+ shortcut.
16
+
17
+ If the diagnostic reports a route/fact conflict, preserve the status output and
18
+ stop lifecycle writes until the conflict is resolved.
19
+
20
+ `diagnostic.compile-route-ambiguous` means project declarations assign more
21
+ than one compile phase to the same source and collection. Make that ownership
22
+ unique in `src/index.ts`; verification cannot choose one for you.
23
+
24
+ `diagnostic.structure-snapshot-missing` means a persisted compile batch names a
25
+ confirmed structure digest whose snapshot is absent. Restore that snapshot, or
26
+ declare and confirm a new structure round for the affected source and
27
+ collection. Do not edit digest fields to silence the diagnostic.
@@ -0,0 +1,34 @@
1
+ ---
2
+ id: dialogue.code-extraction
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Code-extraction dialogue
8
+
9
+ Describe the proposed code scope before SDK fields. State:
10
+
11
+ - the confirmed repository module;
12
+ - which files are included;
13
+ - whether extraction follows configured/public entries or scans all matched
14
+ files;
15
+ - whether internal symbols are included; and
16
+ - that the first run or later deltas produce Review candidates rather than
17
+ approved Markdown.
18
+
19
+ If a selected package lacks a standard entry, offer two Context-owned choices:
20
+ configure source-relative API roots, or use scan mode for all declarations in
21
+ the confirmed file scope. Do not ask the user to change source code or package
22
+ metadata to satisfy Context.
23
+
24
+ Run the route-selected dry-run first. Report discovered, AST-analyzed, skipped,
25
+ symbol, relation, and candidate counts separately, plus resolved entries,
26
+ exported/internal counts, symbol-kind counts, and the proposed knowledge tree.
27
+ Treat those fields as structural scope evidence, not a semantic ranking. Stop
28
+ when the preview crosses the confirmed module boundary or the module
29
+ identity/path shape is wrong.
30
+
31
+ For a multi-module round, finish every pending extraction target before opening
32
+ one Review. For an unchanged repeat run, explain that no added, changed, or
33
+ removed symbols need a decision. Mention `extractTs`, `include`, `entries`,
34
+ `mode`, or `exportedOnly` only in technical configuration detail.
@@ -0,0 +1,29 @@
1
+ ---
2
+ id: dialogue.document-capture
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Document-capture dialogue
8
+
9
+ Registration records a document boundary but does not read its body. Before the
10
+ capture gate is resolved, explain that capture will:
11
+
12
+ - read only the registered local or remote module;
13
+ - write a normalized committed snapshot under the date directory;
14
+ - update that date directory's shared `manifest.json`; and
15
+ - provide offline evidence for Review, verify, and fresh-clone reproduction.
16
+
17
+ For remote documents, credentials stay in the external document client and are
18
+ not written to the workspace. Several requested documents may share the date,
19
+ while each retains its own module and snapshot identity.
20
+
21
+ Ask for permission to read the exact pending modules. Do not run capture,
22
+ refresh, or capture preview before permission is clear. A request that
23
+ explicitly says to ingest, fetch, capture, or read the named documents grants
24
+ that scope; merely mentioning a possible source does not.
25
+
26
+ If deterministic inspection detects `.mdx`, route metadata, sidebars, or a docs
27
+ configuration, explain that the boundary looks like a documentation site and
28
+ ask whether to use the Context document-site processor. Do not infer that
29
+ choice from filenames alone.
@@ -0,0 +1,33 @@
1
+ ---
2
+ id: dialogue.document-classification
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Document-classification dialogue
8
+
9
+ Do not recommend a collection before reading the collection-neutral evidence
10
+ view and every required source-body resource. Summarize the observed document
11
+ shape, explain one evidence-backed
12
+ recommendation, and describe its package root:
13
+
14
+ | Collection | Use when the evidence primarily represents | Package root |
15
+ |---|---|---|
16
+ | `business` | business domains, actors, objects, and non-technical domain knowledge | `wikis/` |
17
+ | `product` | requirements, user behavior, user stories, and acceptance intent | `wikis/` |
18
+ | `architecture` | system structure, module design, technical mechanisms, and platform/tooling design | `guides/` |
19
+ | `sop` | procedures, runbooks, operations, maintenance, and troubleshooting steps | `guides/` |
20
+ | `faq` | question-and-answer material intended for issue-oriented retrieval | `guides/` |
21
+ | `standards` | normative rules, constraints, checklists, and quality/compliance requirements | `rules/` |
22
+ | `decision` | explicit alternatives, selected choices, trade-offs, and decision records | `guides/` |
23
+ | `incident` | incident timelines, impact, causes, response, and prevention | `guides/` |
24
+ | `test` | test plans, validation scenarios, matrices, and acceptance cases | `rules/` |
25
+
26
+ `codegraph` comes from code extraction and `feats` is not a document mainline
27
+ collection. Filenames, URLs, titles, and example collection names are
28
+ insufficient evidence.
29
+
30
+ Ask the user to confirm exactly one mainline collection for the current source,
31
+ unless session-managed authority resolves this gate. After confirmation,
32
+ declare the complete align, compile, and Review lifecycle for the same source
33
+ and collection, then re-evaluate because other captured targets may remain.
@@ -0,0 +1,26 @@
1
+ ---
2
+ id: dialogue.evidence-maintenance
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Evidence-maintenance dialogue
8
+
9
+ Explain that approved content remains present but its current source evidence
10
+ has changed.
11
+
12
+ For stale evidence, offer:
13
+
14
+ - create an updated Review candidate when facts, wording, or scope may have
15
+ changed; or
16
+ - re-pin the existing page only when the content is still valid and the change
17
+ is purely locational or otherwise body-neutral.
18
+
19
+ For orphaned evidence, offer:
20
+
21
+ - deprecate the page so later packages stop selecting it while audit history is
22
+ retained; or
23
+ - keep it as source-orphaned knowledge with an explicit continuing warning.
24
+
25
+ Do not describe re-pin as content refresh, and do not target maintenance by a
26
+ guessed file path. Use the current diagnostic's exact `view_ref`.
@@ -0,0 +1,34 @@
1
+ ---
2
+ id: dialogue.human-gates
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Human-gate dialogue
8
+
9
+ Explain the user decision before implementation detail. State:
10
+
11
+ - what is being decided;
12
+ - what changes after confirmation;
13
+ - which source boundary, knowledge shape, or output is affected; and
14
+ - which meaningful alternatives exist.
15
+
16
+ Use the user's conversation language. Keep commands, paths, ids, status values,
17
+ payload keys, and `source_ref` values exact.
18
+
19
+ When two or three fixed choices exist, prefer the host's native choice UI. If
20
+ none is available, present concise A/B/C choices with one impact sentence each.
21
+ Labels must describe user outcomes, not SDK factories or internal route names.
22
+ Do not start with raw TypeScript, placeholder commands, `alignProse`,
23
+ `compileProse`, `reviewValidity`, `kbPackage`, or `llmsPackage`.
24
+
25
+ An explicit fully managed request in the current conversation resolves only
26
+ delegatable gates. Use the returned managed route without asking those
27
+ questions again. Managed authority is not project state: never persist it,
28
+ reuse it in another conversation, use it to choose a source boundary, authorize
29
+ an unread external source, approve an external operation, or hide validation
30
+ and verification failures.
31
+
32
+ Keep transition reports short: what changed, the current state, and the next
33
+ decision or action. Do not paste a raw CLI transcript unless the user requests
34
+ it.
@@ -0,0 +1,27 @@
1
+ ---
2
+ id: dialogue.knowledge-review
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Knowledge-review dialogue
8
+
9
+ Explain that Review is the boundary between draft candidates and approved
10
+ Markdown. In ordinary mode:
11
+
12
+ 1. open the complete current Review report;
13
+ 2. let the user approve or reject candidates;
14
+ 3. ask them to copy the decision Payload back into the conversation; and
15
+ 4. apply only that exact Payload through the returned command.
16
+
17
+ The user does not need to create a payload file; the Agent may write the pasted
18
+ payload to ignored scratch storage for the CLI command. Never derive a payload
19
+ from HTML, candidate ids, snapshots, or a default decision.
20
+
21
+ Do not open Review for one page or module while another confirmed item in the
22
+ same round is still being generated. If a repeat codegraph run has no delta,
23
+ state that existing approvals were preserved and no Review gate remains.
24
+
25
+ When the user explicitly requested fully managed operation, use only the
26
+ revision-bound atomic approve command returned by the managed route. Do not
27
+ synthesize per-candidate approval calls.
@@ -0,0 +1,30 @@
1
+ ---
2
+ id: dialogue.package-output
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Package-output dialogue
8
+
9
+ Explain output shapes before SDK factory names. Offer:
10
+
11
+ - an Agent knowledge-base package with `AGENTS.md`, a knowledge-query Skill,
12
+ approved OKF roots, and adaptive indexes;
13
+ - one LLM text bundle for model context or RAG import; or
14
+ - no package yet, leaving approved Markdown in `knowledge/`.
15
+
16
+ For the Agent knowledge-base package, show a compact tree and explain that
17
+ small directory contents are linked from the parent index while a directory
18
+ with more than the configured threshold gets its own child index. Templates
19
+ under `src/package-templates/` are editable presentation, not a second factual
20
+ source.
21
+
22
+ After the user chooses an Agent knowledge-base package, explain that its
23
+ knowledge roots are flat inside `dist/<package-name>/`; do not ask for a second
24
+ package namespace. Ask whether Skills need a short optional prefix, then
25
+ maintain their complete final names in the template. Do not expose downstream
26
+ layout terminology or ask for platform-specific identity fields.
27
+
28
+ Do not offer a hidden `both` shortcut. If the user wants multiple outputs,
29
+ declare and inspect one first, then obtain confirmation for the next. Mention
30
+ `kbPackage` and `llmsPackage` only after the semantic output choice.
@@ -0,0 +1,29 @@
1
+ ---
2
+ id: dialogue.source-boundary
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Source-boundary dialogue
8
+
9
+ Describe the boundary in user terms before showing a registration command. For
10
+ code, distinguish a whole repository/subspace from one concrete package or
11
+ subdirectory. For documents, distinguish one file, a local document directory,
12
+ a documentation site, and a remote document.
13
+
14
+ Explain the observable impact:
15
+
16
+ - the date is one capture batch;
17
+ - every confirmed source is a module inside that batch;
18
+ - several code and document modules may share the date;
19
+ - `date/module` appears in source refs and phase ids; and
20
+ - stable codegraph knowledge paths use the module name without the date.
21
+
22
+ Do not invent `-A`, `-B`, or sequence suffixes. If today's batch exists, append
23
+ the newly confirmed module to it.
24
+
25
+ When inspection finds several package boundaries, show their paths and ask
26
+ which concrete boundaries should become sources. Explain that `include`
27
+ filters files inside a source and cannot select a monorepo package. Only after
28
+ the choice is explicit should the Agent use the route-selected registration
29
+ schema and command.
@@ -0,0 +1,44 @@
1
+ ---
2
+ id: dialogue.structure-confirmation
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Structure-confirmation dialogue
8
+
9
+ Present the staged structure as a proposal, not as approved knowledge. Explain
10
+ that confirmation freezes the current round's:
11
+
12
+ - knowledge pages and paths;
13
+ - section ownership and source spans;
14
+ - source-backed relationships; and
15
+ - compile order.
16
+
17
+ The final staged HTML report is the confirmation surface. Open it when the CLI
18
+ returns it, report whether opening succeeded, and provide the file URL/path when
19
+ it did not. Do not confirm from counts alone.
20
+
21
+ Present these three outcomes in the user's language:
22
+
23
+ - confirm the current staged structure digest;
24
+ - revise the proposed structure and validate/stage it again; or
25
+ - return to the source boundary when the current evidence scope is wrong.
26
+
27
+ If staging changed the structure digest, any earlier confirmation no longer
28
+ applies. When `workflow.current.gate.resolution` is `user`, explain the change
29
+ and obtain a new confirmation. When it is `session-authority`, inspect the same
30
+ report and continue without asking again. After resolution, execute only the
31
+ revision-bound command returned by `workflow.current`; never construct or reuse
32
+ a phase-local confirmation command.
33
+
34
+ Deterministic boundary repairs are internal CLI maintenance and are not
35
+ separate approval rounds. If `workflow.current.gate.resolution` is
36
+ `session-authority`, inspect the final staged report and execute the returned
37
+ resolution command without asking the user again. Otherwise ask for one final
38
+ confirmation of the staged digest. Ask an earlier design question only when
39
+ evidence supports multiple incompatible structures, and say clearly that it is
40
+ not the final confirmation.
41
+
42
+ One source document may map to one page, but that is still an ordinary
43
+ structure proposal. A multi-source round confirms each source/collection slot;
44
+ do not confuse one slot with completion of the entire document batch.
@@ -0,0 +1,259 @@
1
+ ---
2
+ id: context.sdk.package-outputs
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Package Outputs
8
+
9
+ Package outputs are generated folders under `dist/`. They turn approved
10
+ knowledge from `knowledge/` into a shape that another consumer can install,
11
+ read, or import.
12
+
13
+ Package output is a human decision gate. Do not add package declarations until
14
+ the user chooses the intended consumer and output shape.
15
+
16
+ Package build consumes approved and closed knowledge. If status reports that
17
+ close is required, run deterministic close before build. Current close derives
18
+ `knowledge/structure.yaml`, persists approved edge projection, and runs the
19
+ final verify gate without rewriting approved Markdown. References, changelog,
20
+ package index, and section fingerprint rebuilds are not current close output.
21
+
22
+ ## Recommended First Output: Agent Knowledge-Base Package
23
+
24
+ Choose an agent knowledge-base package first when the knowledge should help
25
+ Coding Agents work with the project. After the user chooses this semantic
26
+ output shape, implement it with `kbPackage()`.
27
+
28
+ Typical output:
29
+
30
+ ```text
31
+ dist/<package-name>/
32
+ ├── AGENTS.md
33
+ ├── skills/
34
+ │ └── knowledge-query/
35
+ │ └── SKILL.md
36
+ └── wikis/
37
+ ├── index.md
38
+ └── ...
39
+ ```
40
+
41
+ Choose this when the user wants:
42
+
43
+ - agent-facing guidance generated from the reviewed knowledge;
44
+ - a package that can be installed as an agent knowledge base;
45
+ - a starting point that can later be refined into task-specific skills.
46
+
47
+ The underlying `kbPackage()` declaration requires a template containing at
48
+ least one `SKILL.md` and `wikis/index.md`.
49
+ The default `src/package-templates/kb/` template is only a starting point.
50
+ Inspect the generated `dist/<package-name>/` before calling it usable.
51
+
52
+ KB packages use flat package-relative knowledge roots:
53
+
54
+ ```ts
55
+ kbPackage({
56
+ name: "component-lib-kb",
57
+ template: "src/package-templates/kb",
58
+ });
59
+ ```
60
+
61
+ The package name already identifies the surrounding build folder, so the
62
+ output does not repeat it inside each root:
63
+
64
+ ```text
65
+ skills/knowledge-query/SKILL.md
66
+ wikis/index.md
67
+ guides/...
68
+ rules/...
69
+ feats/...
70
+ ```
71
+
72
+ Do not ask for another distribution namespace. Older workspaces may still
73
+ contain `distribution.knowledgeNamespace`; Context accepts that legacy input
74
+ without using it to shape the package.
75
+
76
+ Skill names are separate. Ask whether the author wants a short optional Skill
77
+ prefix, then maintain the complete final template directory name directly—for
78
+ example `skills/android-query/SKILL.md`. Package-root layout never renames a
79
+ Skill.
80
+
81
+ The default `knowledge-query` Skill is a complete generic query entry. It
82
+ carries the structure-first query discipline: start from OKF directory indexes, use
83
+ `context-build-inventory.json` edge records for package-visible relationships,
84
+ inspect page `sources` / `context:section` source_ref metadata, cite
85
+ page/section evidence, and report explicit gaps when the package does not cover
86
+ a requested fact. It does not treat direct grep over bundled OKF root
87
+ directories as the primary discovery path. When indexes do not narrow the
88
+ scope, or a candidate page is too large to read directly, its bundled
89
+ `scripts/search.mjs` provides deterministic BM25 ranking over mechanically
90
+ bounded Markdown chunks. Search results are leads; page bodies and typed edge
91
+ records remain the evidence. Its final template-author section
92
+ requires package authors to replace or edit the generic routing when the
93
+ package needs project-specific terminology, entry points, known limits, or
94
+ task workflows. Authors may explicitly accept the generic default when it is
95
+ intentionally sufficient.
96
+
97
+ The same inventory exposes `structure.relationship_coverage`. It records
98
+ whether selected codegraph pages have current source-backed AST relationship
99
+ metadata, how many codegraph views were selected, and how many package-visible
100
+ edges were emitted. An empty edge list is therefore explicit evidence of a
101
+ coverage state, not permission to invent a dependency.
102
+
103
+ The generated `wikis/` directory is the default OKF root and follows the C4A OKF
104
+ Profile. Internal production collections are mapped into package OKF roots such
105
+ as `wikis/`, `guides/`, `rules/`, or `feats/`; when selected, `context build`
106
+ copies them into the package and generates root-aware directory indexes for them
107
+ as needed. Selected OKF roots always have an index; smaller child directories
108
+ are folded into their nearest generated ancestor index by default. These roots
109
+ contain consumer-oriented Markdown with reader-facing frontmatter and no Context
110
+ lifecycle comments. Node identity, source metadata, code symbol lists,
111
+ relationship records, generated-child records, and candidate fingerprints are
112
+ kept out of each page. `context-build-inventory.json` maps distributed paths to
113
+ approved knowledge paths and exposes package-visible structure; exact Section
114
+ evidence remains in the mapped `knowledge/` page. The package root is an agent
115
+ package; the OKF-compatible interchange surface is the selected OKF root
116
+ subtrees under `dist/<package-name>/`. The required template entry and final
117
+ output path are both `wikis/index.md`.
118
+
119
+ Current collection mapping:
120
+
121
+ | Internal collection | Package path | Role |
122
+ |---|---|---|
123
+ | `codegraph` | `wikis/codegraph/` | Structured code entities and relationships. |
124
+ | `business` | `wikis/business/` | Structured business entities and relationships. |
125
+ | `product` | `wikis/product/` | Structured product entities, behavior, and relationships. |
126
+ | `architecture` | `guides/architecture/` | Architecture explanations and design narratives. |
127
+ | `sop` | `guides/sop/` | Procedures and runbooks. |
128
+ | `faq` | `guides/faq/` | Question-oriented explanations and troubleshooting. |
129
+ | `decision` | `guides/decision/` | Decision records and trade-off narratives. |
130
+ | `incident` | `guides/incident/` | Incident timelines, response, and follow-up. |
131
+ | `standards` | `rules/standards/` | Normative standards and constraints. |
132
+ | `test` | `rules/test/` | Validation rules, scenarios, and acceptance checks. |
133
+ | `feats` | `feats/` | Feature capability records. |
134
+
135
+ `wikis/` is the structured entity-and-relationship layer. `guides/` and
136
+ `rules/` may explain, operationalize, or constrain that knowledge; their
137
+ placement does not create a relationship unless Context includes a typed edge.
138
+
139
+ `index.md` is reserved for OKF bundle and directory indexes. Source documents
140
+ may be named `index.md`, but generated concept pages must use a non-reserved
141
+ name such as `index-page.md`; `context build` rejects copied knowledge that
142
+ occupies `wikis/**/index.md`.
143
+
144
+ `src/package-templates/kb/wikis/index.md` is the bundle entry page template.
145
+ Tell the user it can be edited before build to describe the package scope,
146
+ intended users, and query guidance.
147
+
148
+ The default root index is a usable generic entry, not a project-specific
149
+ information architecture.
150
+ It links directly to pages in small child directories and to a child
151
+ `index.md` when that directory exceeds the configured navigation threshold.
152
+ The default threshold is 50 selected knowledge pages. Use Handlebars variables such as
153
+ `knowledgeGroups`, `knowledgeItems`, and `knowledgeTree` when a project needs
154
+ custom navigation. Before customizing it, read
155
+ `node_modules/@c4a/context/docs/reference/template-variables.md`.
156
+
157
+ Newly initialized generic templates must be replaced, edited, or explicitly
158
+ accepted before the first build. `context status` exposes that choice as a
159
+ package template Review Gate. Use only the revision-bound command returned by
160
+ that Route to accept an unchanged generic default; edit files under
161
+ `src/package-templates/` when customizing. Context compares file digests and
162
+ records the decision without evaluating the meaning of template prose.
163
+
164
+ Template paths are rendered before selected knowledge is copied. A rendered
165
+ template path must not collide with a selected knowledge path. If the build
166
+ reports a collision, rename the template file or exclude that knowledge path
167
+ with `select.exclude`.
168
+
169
+ Template prose must not become a second knowledge source. If a template
170
+ describes package coverage, scope, known gaps, or known limits, it must cite
171
+ approved knowledge, `context-build-inventory.json`, or rendered structure data
172
+ inside the package. Otherwise `context build` reports a template-boundary
173
+ diagnostic. Repair the template under `src/package-templates/`; do not patch
174
+ `dist/` as the durable fix.
175
+
176
+ KB package index links are also checked. `context build` validates every
177
+ selected OKF root index and generated child `index.md` so relative links and
178
+ OKF bundle-root absolute links resolve inside `dist/<package-name>/`. Broken
179
+ index links are fixed by editing the template, approved knowledge path, or
180
+ package declaration and rerunning `context build`; do not patch `dist/`
181
+ directly as the durable fix.
182
+
183
+ ## Alternative Output: LLM Text
184
+
185
+ Choose an LLM text bundle when the user wants a single text bundle for model
186
+ context, RAG import, or manual reading. After the user chooses this semantic
187
+ output shape, implement it with `llmsPackage()`.
188
+
189
+ Typical output:
190
+
191
+ ```text
192
+ dist/<package-name>/
193
+ └── llms.txt
194
+ ```
195
+
196
+ Choose this when the user wants:
197
+
198
+ - one consolidated text file;
199
+ - a format that is easy to copy, index, or upload elsewhere;
200
+ - no agent skill packaging yet.
201
+
202
+ ## Skip Package Output
203
+
204
+ The user may choose to stop after approved Markdown. In that case, keep
205
+ `packages: []` and do not run `context build`.
206
+
207
+ Approved knowledge still lives in:
208
+
209
+ ```text
210
+ knowledge/
211
+ └── ...
212
+ ```
213
+
214
+ ## How To Ask The User
215
+
216
+ When `workflow.current.reason_code` is `route.package.output-required`,
217
+ explain the choices with the output tree. Do not ask the user to pick from
218
+ unexplained labels.
219
+ Use the host's native multi-choice tool when available. If unavailable, fall
220
+ back to a short Markdown A/B/C question. The option labels should be:
221
+ agent knowledge-base package, LLM text bundle, and skip package output for now.
222
+
223
+ Recommended question shape:
224
+
225
+ ```text
226
+ The reviewed knowledge is approved. The next decision is how to package it.
227
+
228
+ Recommended: agent knowledge-base package
229
+ dist/<name>-kb/
230
+ ├── AGENTS.md
231
+ ├── skills/knowledge-query/SKILL.md
232
+ └── wikis/
233
+ ├── index.md
234
+ ├── <group-page>.md
235
+ └── <large-group>/index.md
236
+
237
+ This is best if agents should use the knowledge as a reusable knowledge base.
238
+
239
+ Alternative: LLM text bundle
240
+ dist/<name>-llms/
241
+ └── llms.txt
242
+
243
+ This is best if you need one text bundle for model/RAG import.
244
+
245
+ We can also skip package output for now and keep only knowledge/.
246
+
247
+ Which one should I declare first?
248
+ ```
249
+
250
+ If the user chooses the Agent knowledge-base package, explain that its OKF
251
+ roots are flat within `dist/<package-name>/`; do not ask for a second namespace.
252
+ Ask whether its Skills need a short prefix. The author maintains final Skill
253
+ names independently from package paths.
254
+
255
+ Do not offer `both` as a shortcut. If the user wants multiple outputs, add one
256
+ package first, verify the shape, then add another package after confirmation.
257
+ The default adaptive index policy avoids one-page directory indexes. Configure
258
+ `kbPackage().navigation` when a package needs a different inline-entry
259
+ threshold or a fully expanded index at every directory.