@blxzer/cursor-trellis 0.4.2 → 0.4.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 (315) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +23 -14
  3. package/README.zh-CN.md +14 -10
  4. package/bin/smart-search.js +10 -2
  5. package/dist/cli/index.d.ts.map +1 -1
  6. package/dist/cli/index.js +36 -15
  7. package/dist/cli/index.js.map +1 -1
  8. package/dist/commands/init.d.ts +1 -1
  9. package/dist/commands/init.d.ts.map +1 -1
  10. package/dist/commands/init.js +42 -153
  11. package/dist/commands/init.js.map +1 -1
  12. package/dist/commands/migrate.d.ts +10 -0
  13. package/dist/commands/migrate.d.ts.map +1 -0
  14. package/dist/commands/migrate.js +38 -0
  15. package/dist/commands/migrate.js.map +1 -0
  16. package/dist/commands/update.d.ts +5 -0
  17. package/dist/commands/update.d.ts.map +1 -1
  18. package/dist/commands/update.js +137 -40
  19. package/dist/commands/update.js.map +1 -1
  20. package/dist/configurators/cursor.d.ts +2 -1
  21. package/dist/configurators/cursor.d.ts.map +1 -1
  22. package/dist/configurators/cursor.js +4 -2
  23. package/dist/configurators/cursor.js.map +1 -1
  24. package/dist/configurators/index.js +4 -4
  25. package/dist/configurators/index.js.map +1 -1
  26. package/dist/configurators/shared.d.ts +8 -0
  27. package/dist/configurators/shared.d.ts.map +1 -1
  28. package/dist/configurators/shared.js +27 -1
  29. package/dist/configurators/shared.js.map +1 -1
  30. package/dist/configurators/workflow.d.ts +0 -9
  31. package/dist/configurators/workflow.d.ts.map +1 -1
  32. package/dist/configurators/workflow.js +2 -4
  33. package/dist/configurators/workflow.js.map +1 -1
  34. package/dist/constants/paths.d.ts +9 -0
  35. package/dist/constants/paths.d.ts.map +1 -1
  36. package/dist/constants/paths.js +13 -0
  37. package/dist/constants/paths.js.map +1 -1
  38. package/dist/migrations/manifests/0.3.0.json +1 -1
  39. package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/skills-and-commands.md +2 -4
  40. package/dist/templates/common/bundled-skills/cstl-skill-creator/SKILL.md +10 -7
  41. package/dist/templates/common/bundled-skills/cstl-skill-creator/references/authoring-rules.md +93 -19
  42. package/dist/templates/common/bundled-skills/cstl-skill-creator/references/general-authoring.md +189 -0
  43. package/dist/templates/common/bundled-skills/cstl-skill-creator/references/review-checklist.md +10 -5
  44. package/dist/templates/common/commands/continue.md +5 -4
  45. package/dist/templates/common/index.d.ts +20 -0
  46. package/dist/templates/common/index.d.ts.map +1 -1
  47. package/dist/templates/common/index.js +21 -2
  48. package/dist/templates/common/index.js.map +1 -1
  49. package/dist/templates/common/optional-skills/chrome-cdp/SKILL.md +179 -0
  50. package/dist/templates/common/optional-skills/chrome-cdp/examples/fetch-hook-api-capture.md +149 -0
  51. package/dist/templates/common/optional-skills/chrome-cdp/scripts/cdp.mjs +903 -0
  52. package/dist/templates/cursor/agents/cstl-research.md +1 -1
  53. package/dist/templates/cursor/fixtures/expected-rules.d.ts +1 -1
  54. package/dist/templates/cursor/fixtures/expected-rules.d.ts.map +1 -1
  55. package/dist/templates/cursor/fixtures/expected-rules.js +7 -24
  56. package/dist/templates/cursor/fixtures/expected-rules.js.map +1 -1
  57. package/dist/templates/cursor/hooks.json +4 -0
  58. package/dist/templates/cursor/index.d.ts +1 -1
  59. package/dist/templates/cursor/index.js +1 -1
  60. package/dist/templates/cursor/rules/cstl-bootstrap.mdc +17 -0
  61. package/dist/templates/markdown/agents.md +15 -10
  62. package/dist/templates/markdown/framework/cursor-native-modes-guide.md.txt +12 -9
  63. package/dist/templates/markdown/framework/cursor-subagent-policy.md.txt +62 -126
  64. package/dist/templates/markdown/framework/dogfood-only-surfaces.md.txt +4 -6
  65. package/dist/templates/markdown/framework/execution-strategy.md.txt +2 -0
  66. package/dist/templates/markdown/framework/index.md.txt +4 -0
  67. package/dist/templates/markdown/framework/internal-skills-cursor-reachability.md.txt +4 -3
  68. package/dist/templates/markdown/framework/middleware-protocol.md.txt +83 -0
  69. package/dist/templates/markdown/framework/parallel-first-execution.md.txt +78 -0
  70. package/dist/templates/markdown/framework/release-boundary.md.txt +30 -0
  71. package/dist/templates/markdown/framework/retrieval-daily-guide.md.txt +1 -1
  72. package/dist/templates/markdown/framework/upgrade.md.txt +15 -0
  73. package/dist/templates/markdown/index.d.ts +4 -0
  74. package/dist/templates/markdown/index.d.ts.map +1 -1
  75. package/dist/templates/markdown/index.js +17 -0
  76. package/dist/templates/markdown/index.js.map +1 -1
  77. package/dist/templates/markdown/spec/guides/index.md.txt +0 -6
  78. package/dist/templates/shared-hooks/event-bridge.py +60 -0
  79. package/dist/templates/shared-hooks/index.d.ts +1 -1
  80. package/dist/templates/shared-hooks/index.d.ts.map +1 -1
  81. package/dist/templates/shared-hooks/index.js +1 -0
  82. package/dist/templates/shared-hooks/index.js.map +1 -1
  83. package/dist/templates/shared-hooks/session-start.py +18 -1
  84. package/dist/templates/trellis/CONTEXT.md +63 -3
  85. package/dist/templates/trellis/gitignore.txt +39 -39
  86. package/dist/templates/trellis/index.d.ts +12 -0
  87. package/dist/templates/trellis/index.d.ts.map +1 -1
  88. package/dist/templates/trellis/index.js +73 -15
  89. package/dist/templates/trellis/index.js.map +1 -1
  90. package/dist/templates/trellis/pool/README.md +12 -3
  91. package/dist/templates/trellis/pool/plan.md +24 -5
  92. package/dist/templates/trellis/scripts/common/adapter_middleware.py +158 -0
  93. package/dist/templates/trellis/scripts/common/artifact_locale.py +12 -3
  94. package/dist/templates/trellis/scripts/common/cursor_retrieval_env.py +5 -2
  95. package/dist/templates/trellis/scripts/common/full_quality.py +237 -0
  96. package/dist/templates/trellis/scripts/common/git.py +6 -0
  97. package/dist/templates/trellis/scripts/common/git_context.py +17 -5
  98. package/dist/templates/trellis/scripts/common/kernel_command.py +367 -0
  99. package/dist/templates/trellis/scripts/common/lite_context.py +280 -0
  100. package/dist/templates/trellis/scripts/common/ondemand_topology.py +225 -0
  101. package/dist/templates/trellis/scripts/common/parent_orchestration.py +1 -1
  102. package/dist/templates/trellis/scripts/common/pool_store.py +16 -4
  103. package/dist/templates/trellis/scripts/common/retrieval_agent_instructions.py +2 -2
  104. package/dist/templates/trellis/scripts/common/session_context.py +28 -2
  105. package/dist/templates/trellis/scripts/common/task_gates.py +73 -12
  106. package/dist/templates/trellis/scripts/common/task_map.py +42 -9
  107. package/dist/templates/trellis/scripts/common/task_store.py +286 -56
  108. package/dist/templates/trellis/scripts/common/test_adapter_middleware.py +56 -0
  109. package/dist/templates/trellis/scripts/common/test_depends_mode_block.py +9 -0
  110. package/dist/templates/trellis/scripts/common/test_full_quality.py +197 -0
  111. package/dist/templates/trellis/scripts/common/test_kernel_command.py +326 -0
  112. package/dist/templates/trellis/scripts/common/test_lite_path.py +190 -0
  113. package/dist/templates/trellis/scripts/common/test_ondemand_topology.py +122 -0
  114. package/dist/templates/trellis/scripts/common/test_pool_store.py +17 -0
  115. package/dist/templates/trellis/scripts/common/test_task_store_kernel_patch.py +163 -0
  116. package/dist/templates/trellis/scripts/common/workflow_phase.py +3 -0
  117. package/dist/templates/trellis/scripts/get_context.py +1 -0
  118. package/dist/templates/trellis/scripts/pool.py +5 -0
  119. package/dist/templates/trellis/scripts/task.py +83 -7
  120. package/dist/templates/trellis/workflow.md +100 -18
  121. package/dist/utils/cursor-retrieval-env.d.ts +2 -1
  122. package/dist/utils/cursor-retrieval-env.d.ts.map +1 -1
  123. package/dist/utils/cursor-retrieval-env.js +3 -2
  124. package/dist/utils/cursor-retrieval-env.js.map +1 -1
  125. package/dist/utils/cursor2plus-residue-cleanup.d.ts +38 -0
  126. package/dist/utils/cursor2plus-residue-cleanup.d.ts.map +1 -0
  127. package/dist/utils/cursor2plus-residue-cleanup.js +145 -0
  128. package/dist/utils/cursor2plus-residue-cleanup.js.map +1 -0
  129. package/dist/utils/manifest-prune.d.ts.map +1 -1
  130. package/dist/utils/manifest-prune.js +7 -2
  131. package/dist/utils/manifest-prune.js.map +1 -1
  132. package/dist/utils/p36-upgrade.d.ts +62 -0
  133. package/dist/utils/p36-upgrade.d.ts.map +1 -0
  134. package/dist/utils/p36-upgrade.js +160 -0
  135. package/dist/utils/p36-upgrade.js.map +1 -0
  136. package/dist/utils/project-capabilities.d.ts +1 -12
  137. package/dist/utils/project-capabilities.d.ts.map +1 -1
  138. package/dist/utils/project-capabilities.js +3 -100
  139. package/dist/utils/project-capabilities.js.map +1 -1
  140. package/dist/utils/readiness.d.ts +10 -0
  141. package/dist/utils/readiness.d.ts.map +1 -1
  142. package/dist/utils/readiness.js +58 -26
  143. package/dist/utils/readiness.js.map +1 -1
  144. package/dist/utils/retrieval-agent-instructions.js +1 -1
  145. package/dist/utils/retrieval-agent-instructions.js.map +1 -1
  146. package/dist/utils/template-hash.d.ts.map +1 -1
  147. package/dist/utils/template-hash.js +11 -1
  148. package/dist/utils/template-hash.js.map +1 -1
  149. package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
  150. package/dist/utils/uninstall-scrubbers.js +52 -14
  151. package/dist/utils/uninstall-scrubbers.js.map +1 -1
  152. package/dist/utils/update-rollout-report.d.ts +14 -0
  153. package/dist/utils/update-rollout-report.d.ts.map +1 -1
  154. package/dist/utils/update-rollout-report.js +1 -0
  155. package/dist/utils/update-rollout-report.js.map +1 -1
  156. package/dist/utils/workflow-ownership.d.ts +1 -1
  157. package/dist/utils/workflow-ownership.js +4 -4
  158. package/dist/utils/workflow-ownership.js.map +1 -1
  159. package/package.json +5 -4
  160. package/scripts/postinstall.js +6 -7
  161. package/dist/commands/campaign/canvas-render.d.ts +0 -68
  162. package/dist/commands/campaign/canvas-render.d.ts.map +0 -1
  163. package/dist/commands/campaign/canvas-render.js +0 -414
  164. package/dist/commands/campaign/canvas-render.js.map +0 -1
  165. package/dist/commands/campaign/compose.d.ts +0 -15
  166. package/dist/commands/campaign/compose.d.ts.map +0 -1
  167. package/dist/commands/campaign/compose.js +0 -110
  168. package/dist/commands/campaign/compose.js.map +0 -1
  169. package/dist/commands/campaign/index.d.ts +0 -13
  170. package/dist/commands/campaign/index.d.ts.map +0 -1
  171. package/dist/commands/campaign/index.js +0 -134
  172. package/dist/commands/campaign/index.js.map +0 -1
  173. package/dist/commands/campaign/kind-map.d.ts +0 -6
  174. package/dist/commands/campaign/kind-map.d.ts.map +0 -1
  175. package/dist/commands/campaign/kind-map.js +0 -21
  176. package/dist/commands/campaign/kind-map.js.map +0 -1
  177. package/dist/commands/campaign/mcp-server.d.ts +0 -6
  178. package/dist/commands/campaign/mcp-server.d.ts.map +0 -1
  179. package/dist/commands/campaign/mcp-server.js +0 -167
  180. package/dist/commands/campaign/mcp-server.js.map +0 -1
  181. package/dist/commands/campaign/render.d.ts +0 -5
  182. package/dist/commands/campaign/render.d.ts.map +0 -1
  183. package/dist/commands/campaign/render.js +0 -103
  184. package/dist/commands/campaign/render.js.map +0 -1
  185. package/dist/commands/campaign/trellis-load.d.ts +0 -13
  186. package/dist/commands/campaign/trellis-load.d.ts.map +0 -1
  187. package/dist/commands/campaign/trellis-load.js +0 -122
  188. package/dist/commands/campaign/trellis-load.js.map +0 -1
  189. package/dist/commands/campaign/types.d.ts +0 -61
  190. package/dist/commands/campaign/types.d.ts.map +0 -1
  191. package/dist/commands/campaign/types.js +0 -3
  192. package/dist/commands/campaign/types.js.map +0 -1
  193. package/dist/commands/goal/index.d.ts +0 -3
  194. package/dist/commands/goal/index.d.ts.map +0 -1
  195. package/dist/commands/goal/index.js +0 -159
  196. package/dist/commands/goal/index.js.map +0 -1
  197. package/dist/commands/goal/review.d.ts +0 -6
  198. package/dist/commands/goal/review.d.ts.map +0 -1
  199. package/dist/commands/goal/review.js +0 -28
  200. package/dist/commands/goal/review.js.map +0 -1
  201. package/dist/commands/rpc/client.d.ts +0 -51
  202. package/dist/commands/rpc/client.d.ts.map +0 -1
  203. package/dist/commands/rpc/client.js +0 -147
  204. package/dist/commands/rpc/client.js.map +0 -1
  205. package/dist/commands/rpc/index.d.ts +0 -10
  206. package/dist/commands/rpc/index.d.ts.map +0 -1
  207. package/dist/commands/rpc/index.js +0 -157
  208. package/dist/commands/rpc/index.js.map +0 -1
  209. package/dist/commands/rpc/serve.d.ts +0 -23
  210. package/dist/commands/rpc/serve.d.ts.map +0 -1
  211. package/dist/commands/rpc/serve.js +0 -60
  212. package/dist/commands/rpc/serve.js.map +0 -1
  213. package/dist/commands/rpc/smoke.d.ts +0 -16
  214. package/dist/commands/rpc/smoke.d.ts.map +0 -1
  215. package/dist/commands/rpc/smoke.js +0 -92
  216. package/dist/commands/rpc/smoke.js.map +0 -1
  217. package/dist/commands/sdk/index.d.ts +0 -9
  218. package/dist/commands/sdk/index.d.ts.map +0 -1
  219. package/dist/commands/sdk/index.js +0 -58
  220. package/dist/commands/sdk/index.js.map +0 -1
  221. package/dist/commands/sdk/run.d.ts +0 -42
  222. package/dist/commands/sdk/run.d.ts.map +0 -1
  223. package/dist/commands/sdk/run.js +0 -220
  224. package/dist/commands/sdk/run.js.map +0 -1
  225. package/dist/commands/sdk/status.d.ts +0 -14
  226. package/dist/commands/sdk/status.d.ts.map +0 -1
  227. package/dist/commands/sdk/status.js +0 -69
  228. package/dist/commands/sdk/status.js.map +0 -1
  229. package/dist/configurators/cursor2plus-local.d.ts +0 -6
  230. package/dist/configurators/cursor2plus-local.d.ts.map +0 -1
  231. package/dist/configurators/cursor2plus-local.js +0 -21
  232. package/dist/configurators/cursor2plus-local.js.map +0 -1
  233. package/dist/goal/action-packet.d.ts +0 -89
  234. package/dist/goal/action-packet.d.ts.map +0 -1
  235. package/dist/goal/action-packet.js +0 -113
  236. package/dist/goal/action-packet.js.map +0 -1
  237. package/dist/goal/audit.d.ts +0 -14
  238. package/dist/goal/audit.d.ts.map +0 -1
  239. package/dist/goal/audit.js +0 -12
  240. package/dist/goal/audit.js.map +0 -1
  241. package/dist/goal/constants.d.ts +0 -26
  242. package/dist/goal/constants.d.ts.map +0 -1
  243. package/dist/goal/constants.js +0 -24
  244. package/dist/goal/constants.js.map +0 -1
  245. package/dist/goal/paths.d.ts +0 -8
  246. package/dist/goal/paths.d.ts.map +0 -1
  247. package/dist/goal/paths.js +0 -36
  248. package/dist/goal/paths.js.map +0 -1
  249. package/dist/goal/preflight.d.ts +0 -21
  250. package/dist/goal/preflight.d.ts.map +0 -1
  251. package/dist/goal/preflight.js +0 -97
  252. package/dist/goal/preflight.js.map +0 -1
  253. package/dist/goal/review-seam.d.ts +0 -44
  254. package/dist/goal/review-seam.d.ts.map +0 -1
  255. package/dist/goal/review-seam.js +0 -153
  256. package/dist/goal/review-seam.js.map +0 -1
  257. package/dist/goal/reviewer-rules.d.ts +0 -13
  258. package/dist/goal/reviewer-rules.d.ts.map +0 -1
  259. package/dist/goal/reviewer-rules.js +0 -153
  260. package/dist/goal/reviewer-rules.js.map +0 -1
  261. package/dist/goal/reviewer.d.ts +0 -9
  262. package/dist/goal/reviewer.d.ts.map +0 -1
  263. package/dist/goal/reviewer.js +0 -54
  264. package/dist/goal/reviewer.js.map +0 -1
  265. package/dist/goal/runtime.d.ts +0 -32
  266. package/dist/goal/runtime.d.ts.map +0 -1
  267. package/dist/goal/runtime.js +0 -242
  268. package/dist/goal/runtime.js.map +0 -1
  269. package/dist/goal/sdk-client.d.ts +0 -10
  270. package/dist/goal/sdk-client.d.ts.map +0 -1
  271. package/dist/goal/sdk-client.js +0 -34
  272. package/dist/goal/sdk-client.js.map +0 -1
  273. package/dist/goal/state.d.ts +0 -40
  274. package/dist/goal/state.d.ts.map +0 -1
  275. package/dist/goal/state.js +0 -37
  276. package/dist/goal/state.js.map +0 -1
  277. package/dist/goal/task-triggers.d.ts +0 -15
  278. package/dist/goal/task-triggers.d.ts.map +0 -1
  279. package/dist/goal/task-triggers.js +0 -23
  280. package/dist/goal/task-triggers.js.map +0 -1
  281. package/dist/goal/walls.d.ts +0 -12
  282. package/dist/goal/walls.d.ts.map +0 -1
  283. package/dist/goal/walls.js +0 -65
  284. package/dist/goal/walls.js.map +0 -1
  285. package/dist/goal/worker-prompt.d.ts +0 -13
  286. package/dist/goal/worker-prompt.d.ts.map +0 -1
  287. package/dist/goal/worker-prompt.js +0 -41
  288. package/dist/goal/worker-prompt.js.map +0 -1
  289. package/dist/goal/worker.d.ts +0 -42
  290. package/dist/goal/worker.d.ts.map +0 -1
  291. package/dist/goal/worker.js +0 -180
  292. package/dist/goal/worker.js.map +0 -1
  293. package/dist/templates/common/bundled-skills/cstl-cursor2plus-setup/SKILL.md +0 -63
  294. package/dist/templates/cursor/commands/cursor2plus-setup.md +0 -82
  295. package/dist/templates/cursor/rules/cstl-cursor-modes.mdc +0 -32
  296. package/dist/templates/cursor/rules/cstl-session-rename.mdc +0 -31
  297. package/dist/templates/cursor/rules/cstl-subagent-dispatch.mdc +0 -34
  298. package/dist/templates/cursor/rules/cstl-triage.mdc +0 -36
  299. package/dist/templates/cursor/rules/retrieval-routing.mdc +0 -78
  300. package/dist/templates/trellis/local/README.md +0 -85
  301. package/dist/templates/trellis/local/config.local.json.example +0 -6
  302. package/dist/templates/trellis/local/index.d.ts +0 -8
  303. package/dist/templates/trellis/local/index.d.ts.map +0 -1
  304. package/dist/templates/trellis/local/index.js +0 -15
  305. package/dist/templates/trellis/local/index.js.map +0 -1
  306. package/dist/templates/trellis/local/patch_wpelc8.py +0 -421
  307. package/dist/templates/trellis/local/smoke.py +0 -94
  308. package/dist/templates/trellis/local/subagent-models.json.example +0 -4
  309. package/dist/templates/trellis/local/trellis-task-models.json.example +0 -10
  310. package/dist/templates/trellis/local/trellis-task-models.json5.example +0 -45
  311. package/dist/templates/trellis/local/trellis_task_models_config.py +0 -200
  312. package/dist/utils/cursor-sdk-gate.d.ts +0 -10
  313. package/dist/utils/cursor-sdk-gate.d.ts.map +0 -1
  314. package/dist/utils/cursor-sdk-gate.js +0 -32
  315. package/dist/utils/cursor-sdk-gate.js.map +0 -1
@@ -26,15 +26,6 @@ export interface WorkflowOptions {
26
26
  * entry for non-native workflows so update.ts treats them as user-managed.
27
27
  */
28
28
  workflowMdOverride?: string;
29
- /**
30
- * Whether to materialize the Cursor++ BYOK local operator bundle
31
- * (`.cstl/local/cursor2plus/`). Defaults to `false` from 1.1.0: only
32
- * written when the user opts in during `cstl init` (interactive BYOK
33
- * question) or passes `--cursor2plus`. Native Cursor API users do not need
34
- * these assets. `cstl update` keeps existing bundles (detected by
35
- * directory presence) regardless of this flag.
36
- */
37
- cursor2plus?: boolean;
38
29
  }
39
30
  /**
40
31
  * Create workflow structure based on project type
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"AA+CA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,8BAA8B,CAAC;AAOtC;;;;;GAKG;AACH,wBAAgB,4BAA4B,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAKlE;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,yFAAyF;IACzF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACjC;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,IAAI,CAAC,CAyEf"}
1
+ {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"AA8CA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,8BAA8B,CAAC;AAOtC;;;;;GAKG;AACH,wBAAgB,4BAA4B,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAKlE;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,yFAAyF;IACzF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACjC;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,IAAI,CAAC,CAwEf"}
@@ -11,7 +11,6 @@ frontendIndexContent, frontendDirectoryStructureContent, frontendTypeSafetyConte
11
11
  guidesIndexContent, guidesCrossLayerThinkingGuideContent, guidesCodeReuseThinkingGuideContent, guidesDurableLearningDecisionGuideContent, guidesDebugLoopGuideContent, guidesPrototypeGuideContent, guidesTestDisciplineGuideContent, guidesCrossPlatformThinkingGuideContent, frameworkDocs, } from "../templates/markdown/index.js";
12
12
  import { writeFile, ensureDir } from "../utils/file-writer.js";
13
13
  import { replacePythonCommandLiterals } from "./shared.js";
14
- import { writeCursor2plusLocalBundle } from "./cursor2plus-local.js";
15
14
  import { sanitizePkgName, } from "../utils/project-detector.js";
16
15
  /**
17
16
  * Root-level files written by the workflow configurator (outside `.cstl/`).
@@ -50,6 +49,8 @@ export async function createWorkflowStructure(cwd, options) {
50
49
  await writeScriptTemplates(path.join(cwd, PATHS.SCRIPTS));
51
50
  // Review-pool skeleton (mechanism docs only; no sample items)
52
51
  await writePoolSkeleton(path.join(cwd, PATHS.POOL));
52
+ // Do not create or write `.cstl/middleware/`. Users drop Manifests there;
53
+ // init/update never write, delete, or hash that overlay.
53
54
  // Copy workflow.md (native bundled template or selected marketplace variant)
54
55
  await writeFile(path.join(cwd, PATHS.WORKFLOW_GUIDE_FILE), replacePythonCommandLiterals(workflowMd));
55
56
  // Copy .gitignore from templates
@@ -73,9 +74,6 @@ export async function createWorkflowStructure(cwd, options) {
73
74
  await writeFile(path.join(cwd, PATHS.WORKSPACE, "index.md"), replacePythonCommandLiterals(agentProgressIndexContent));
74
75
  // Create tasks/ directory
75
76
  ensureDir(path.join(cwd, PATHS.TASKS));
76
- if (options?.cursor2plus) {
77
- await writeCursor2plusLocalBundle(cwd);
78
- }
79
77
  // Create spec templates based on project type
80
78
  // These are NOT dogfooded - they are generic templates for new projects
81
79
  if (packages && packages.length > 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,+BAA+B,CAAC;AAEvC,4BAA4B;AAC5B,OAAO,EACL,yBAAyB;AACzB,gCAAgC;AAChC,mBAAmB,EACnB,gCAAgC,EAChC,gCAAgC,EAChC,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B;AAC3B,iCAAiC;AACjC,oBAAoB,EACpB,iCAAiC,EACjC,yBAAyB,EACzB,6BAA6B,EAC7B,kCAAkC,EAClC,gCAAgC,EAChC,8BAA8B;AAC9B,mBAAmB;AACnB,kBAAkB,EAClB,oCAAoC,EACpC,mCAAmC,EACnC,yCAAyC,EACzC,2BAA2B,EAC3B,2BAA2B,EAC3B,gCAAgC,EAChC,uCAAuC,EACvC,aAAa,GACd,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;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AAI,CAAC,YAAY,EAAE,GAAG,CAAC,IAAI,CAAC,EACjC,4BAA4B,CAAC,GAAG,CAAC,OAAO,CAAC,CAC1C,CAAC;IACJ,CAAC;IAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,sDAAsD;QACtD,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;YAC3B,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC1C,IAAI,kBAAkB,EAAE,GAAG,CAAC,OAAO,CAAC;gBAAE,SAAS;YAC/C,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,IAAI,IAAI,OAAO,EAAE,CAAC,CAAC;YAC/D,SAAS,CAAC,WAAW,CAAC,CAAC;YACvB,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;YAChE,MAAM,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;SAAM,CAAC;QACN,mBAAmB;QACnB,MAAM,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC;IAClE,CAAC;AACH,CAAC"}
@@ -21,6 +21,8 @@ export declare const DIR_NAMES: {
21
21
  readonly SCRIPTS: "scripts";
22
22
  /** Review-pool directory (under .cstl/) */
23
23
  readonly POOL: "pool";
24
+ /** User middleware overlay (under .cstl/) — never written/hashed by init/update */
25
+ readonly MIDDLEWARE: "middleware";
24
26
  };
25
27
  export declare const FILE_NAMES: {
26
28
  /** Root agent instructions file */
@@ -53,6 +55,8 @@ export declare const PATHS: {
53
55
  readonly SCRIPTS: ".cstl/scripts";
54
56
  /** .cstl/pool/ */
55
57
  readonly POOL: ".cstl/pool";
58
+ /** .cstl/middleware/ — user overlay; update never writes, deletes, or hashes */
59
+ readonly MIDDLEWARE: ".cstl/middleware";
56
60
  /** .cstl/.developer */
57
61
  readonly DEVELOPER_FILE: ".cstl/.developer";
58
62
  /** .cstl/.current-task */
@@ -75,4 +79,9 @@ export declare function getTaskDir(taskName: string): string;
75
79
  * @example getArchiveDir() => ".cstl/tasks/archive"
76
80
  */
77
81
  export declare function getArchiveDir(): string;
82
+ /**
83
+ * True for the user middleware overlay and any file under it.
84
+ * `cstl init` / `cstl update` must never write, delete, or hash these paths.
85
+ */
86
+ export declare function isUserMiddlewareOverlayPath(relativePath: string): boolean;
78
87
  //# sourceMappingURL=paths.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/constants/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,eAAO,MAAM,SAAS;IACpB,8BAA8B;;IAE9B,gEAAgE;;IAEhE,4DAA4D;;IAE5D,uCAAuC;;IAEvC,+CAA+C;;IAE/C,gFAAgF;;IAEhF,uCAAuC;;IAEvC,2CAA2C;;CAEnC,CAAC;AAGX,eAAO,MAAM,UAAU;IACrB,mCAAmC;;IAEnC,8BAA8B;;IAE9B,2BAA2B;;IAE3B,oBAAoB;;IAEpB,4BAA4B;;IAE5B,qBAAqB;;IAErB,0BAA0B;;CAElB,CAAC;AAGX,eAAO,MAAM,KAAK;IAChB,aAAa;;IAEb,uBAAuB;;IAEvB,mBAAmB;;IAEnB,kBAAkB;;IAElB,uBAAuB;;IAEvB,qBAAqB;;IAErB,kBAAkB;;IAElB,uBAAuB;;IAEvB,0BAA0B;;IAE1B,wBAAwB;;CAEhB,CAAC;AAEX;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC"}
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/constants/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,eAAO,MAAM,SAAS;IACpB,8BAA8B;;IAE9B,gEAAgE;;IAEhE,4DAA4D;;IAE5D,uCAAuC;;IAEvC,+CAA+C;;IAE/C,gFAAgF;;IAEhF,uCAAuC;;IAEvC,2CAA2C;;IAE3C,mFAAmF;;CAE3E,CAAC;AAGX,eAAO,MAAM,UAAU;IACrB,mCAAmC;;IAEnC,8BAA8B;;IAE9B,2BAA2B;;IAE3B,oBAAoB;;IAEpB,4BAA4B;;IAE5B,qBAAqB;;IAErB,0BAA0B;;CAElB,CAAC;AAGX,eAAO,MAAM,KAAK;IAChB,aAAa;;IAEb,uBAAuB;;IAEvB,mBAAmB;;IAEnB,kBAAkB;;IAElB,uBAAuB;;IAEvB,qBAAqB;;IAErB,kBAAkB;;IAElB,gFAAgF;;IAEhF,uBAAuB;;IAEvB,0BAA0B;;IAE1B,wBAAwB;;CAEhB,CAAC;AAEX;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAMzE"}
@@ -22,6 +22,8 @@ export const DIR_NAMES = {
22
22
  SCRIPTS: "scripts",
23
23
  /** Review-pool directory (under .cstl/) */
24
24
  POOL: "pool",
25
+ /** User middleware overlay (under .cstl/) — never written/hashed by init/update */
26
+ MIDDLEWARE: "middleware",
25
27
  };
26
28
  // File names
27
29
  export const FILE_NAMES = {
@@ -56,6 +58,8 @@ export const PATHS = {
56
58
  SCRIPTS: `${DIR_NAMES.WORKFLOW}/${DIR_NAMES.SCRIPTS}`,
57
59
  /** .cstl/pool/ */
58
60
  POOL: `${DIR_NAMES.WORKFLOW}/${DIR_NAMES.POOL}`,
61
+ /** .cstl/middleware/ — user overlay; update never writes, deletes, or hashes */
62
+ MIDDLEWARE: `${DIR_NAMES.WORKFLOW}/${DIR_NAMES.MIDDLEWARE}`,
59
63
  /** .cstl/.developer */
60
64
  DEVELOPER_FILE: `${DIR_NAMES.WORKFLOW}/${FILE_NAMES.DEVELOPER}`,
61
65
  /** .cstl/.current-task */
@@ -84,4 +88,13 @@ export function getTaskDir(taskName) {
84
88
  export function getArchiveDir() {
85
89
  return `${PATHS.TASKS}/${DIR_NAMES.ARCHIVE}`;
86
90
  }
91
+ /**
92
+ * True for the user middleware overlay and any file under it.
93
+ * `cstl init` / `cstl update` must never write, delete, or hash these paths.
94
+ */
95
+ export function isUserMiddlewareOverlayPath(relativePath) {
96
+ const normalized = relativePath.replace(/\\/g, "/");
97
+ return (normalized === PATHS.MIDDLEWARE ||
98
+ normalized.startsWith(`${PATHS.MIDDLEWARE}/`));
99
+ }
87
100
  //# sourceMappingURL=paths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/constants/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,mCAAmC;AACnC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,8BAA8B;IAC9B,QAAQ,EAAE,OAAO;IACjB,gEAAgE;IAChE,SAAS,EAAE,WAAW;IACtB,4DAA4D;IAC5D,KAAK,EAAE,OAAO;IACd,uCAAuC;IACvC,OAAO,EAAE,SAAS;IAClB,+CAA+C;IAC/C,IAAI,EAAE,MAAM;IACZ,gFAAgF;IAChF,SAAS,EAAE,WAAW;IACtB,uCAAuC;IACvC,OAAO,EAAE,SAAS;IAClB,2CAA2C;IAC3C,IAAI,EAAE,MAAM;CACJ,CAAC;AAEX,aAAa;AACb,MAAM,CAAC,MAAM,UAAU,GAAG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Aa;IAC3B,OAAO,GAAG,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,YAAoB;IAC9D,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpD,OAAO,CACL,UAAU,KAAK,KAAK,CAAC,UAAU;QAC/B,UAAU,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,UAAU,GAAG,CAAC,CAC9C,CAAC;AACJ,CAAC"}
@@ -4,7 +4,7 @@
4
4
  "breaking": true,
5
5
  "recommendMigrate": true,
6
6
  "changelog": "**@blxzer/cursor-trellis 0.3.0 / @blxzer/cursor-trellis-core 0.3.0**\n\n### Breaking\n- feat(cli): rename CLI command from `trellis`/`tl` to `cstl`. The `trellis` and `tl` bin aliases are **removed**. Update any aliases, CI scripts, or shell history that reference `trellis` or `tl`.\n- feat(templates): all skill, command, agent, and rule names renamed `trellis-*` -> `cstl-*` (hard cut, no compatibility aliases).\n - `.cursor/commands/trellis-continue.md` -> `cstl-continue.md`\n - `.cursor/commands/trellis-finish-work.md` -> `cstl-finish-work.md`\n - `.cursor/commands/trellis-cursor2plus-setup.md` -> `cstl-cursor2plus-setup.md`\n - `.cursor/rules/trellis-triage.mdc` -> `cstl-triage.mdc`\n - `.cursor/rules/trellis-subagent-dispatch.mdc` -> `cstl-subagent-dispatch.mdc`\n - `.cursor/agents/trellis-research.md` -> `cstl-research.md`\n - `.cursor/agents/trellis-implement.md` -> `cstl-implement.md`\n - `.cursor/agents/trellis-check.md` -> `cstl-check.md`\n - `.cursor/skills/trellis-meta/` -> `cstl-meta/` (and 4 other bundled skill dirs)\n- fix(hooks): `<!-- trellis-hook-injected -->` marker -> `<!-- cstl-hook-injected -->`\n- fix(subagents): `subagent_type` identifiers `trellis-research/implement/check` -> `cstl-research/implement/check` (affects Cursor++ BYOK `trellis-task-models.json5` keys)\n\n### Upgrade\n\n**Manual npm install required** — the old `trellis upgrade` command no longer exists after install.\n\n```bash\nnpm install -g @blxzer/cursor-trellis@latest\ncstl update --migrate\n```\n\nThe `--migrate` flag is REQUIRED to trigger the file renames in your project. Renames are hash-verified; locally modified files are preserved with a warning.",
7
- "aiInstructions": "When helping a user migrate from 0.2.x to 0.3.0:\n1. **Manual npm install required** — the old `trellis upgrade` command no longer exists after install. Run: `npm install -g @blxzer/cursor-trellis@latest`\n2. **Run `cstl update --migrate`** in each project — the `--migrate` flag is REQUIRED to trigger the rename of `.cursor/commands/trellis-*.md` -> `cstl-*.md`, `.cursor/rules/trellis-*.mdc` -> `cstl-*.mdc`, `.cursor/agents/trellis-*.md` -> `cstl-*.md`, and `.cursor/skills/trellis-*` -> `cstl-*` directories.\n3. Renames are hash-verified; locally modified files are preserved with a warning. The user can manually rename modified files or accept the new template and re-apply their customizations.\n4. Update any personal aliases, CI scripts, or shell history that reference `trellis` or `tl` to use `cstl`.\n5. If the user uses Cursor++ BYOK (`.trellis/local/cursor2plus/`), the `trellis-task-models.json5` keys must be updated from `trellis-research/implement/check` to `cstl-research/implement/check`. Run the `cstl-cursor2plus-setup` skill or edit `~/.ccursor/trellis-task-models.json5` manually then re-run `patch_wpelc8.py --apply`.\n6. The `.trellis/` directory name is UNCHANGED — only the CLI command and skill/command/agent/rule name prefixes changed.",
7
+ "aiInstructions": "When helping a user migrate from 0.2.x to 0.3.0:\n1. **Manual npm install required** — the old `trellis upgrade` command no longer exists after install. Run: `npm install -g @blxzer/cursor-trellis@latest`\n2. **Run `cstl update --migrate`** in each project — the `--migrate` flag is REQUIRED to trigger the rename of `.cursor/commands/trellis-*.md` -> `cstl-*.md`, `.cursor/rules/trellis-*.mdc` -> `cstl-*.mdc`, `.cursor/agents/trellis-*.md` -> `cstl-*.md`, and `.cursor/skills/trellis-*` -> `cstl-*` directories.\n3. Renames are hash-verified; locally modified files are preserved with a warning. The user can manually rename modified files or accept the new template and re-apply their customizations.\n4. Update any personal aliases, CI scripts, or shell history that reference `trellis` or `tl` to use `cstl`.\n5. **Cursor++ retired:** do not run `cstl-cursor2plus-setup` or `patch_wpelc8.py`. If leftover `.cstl/local/cursor2plus/` (or legacy `.trellis/local/cursor2plus/`) exists, treat it as residue `cstl update` hash-safe cleanup removes pristine managed copies; delete unmodified leftovers manually if unused. Product path is Native Cursor.\n6. The `.trellis/` directory name is UNCHANGED — only the CLI command and skill/command/agent/rule name prefixes changed.",
8
8
  "migrations": [
9
9
  {
10
10
  "type": "rename",
@@ -16,7 +16,7 @@ Skills and commands are textual entry points for user interaction with Trellis.
16
16
  Trellis has two skill families:
17
17
 
18
18
  - Workflow skills: `brainstorm`, `before-dev`, `check`, `update-spec`, and `break-loop`.
19
- - Multi-file bundled skills include `cstl-meta`, `cstl-spec-bootstrap`, `cstl-skill-creator`, `smart-search-cli`, `cstl-micro-grill`, and `cstl-cursor2plus-setup`.
19
+ - Multi-file bundled skills include `cstl-meta`, `cstl-spec-bootstrap`, `cstl-skill-creator`, `smart-search-cli`, and `cstl-micro-grill`.
20
20
 
21
21
  Bundled skills are installed as directories and may include nested `agents/`, `examples/`, `references/`, or other lazy-loadable files. Do not describe bundled skills as a closed `cstl-*` list: `smart-search-cli` intentionally keeps its existing non-`cstl-` name.
22
22
 
@@ -28,7 +28,7 @@ Bundled skills are installed as directories and may include nested `agents/`, `e
28
28
 
29
29
  `cstl-micro-grill` is the Trellis clarification adapter. It asks one high-value question at a time and escalates to Lite, Full, or Parent/Child task modes only when durable artifacts or broader risk require it.
30
30
 
31
- `cstl-cursor2plus-setup` guides Cursor++ BYOK users through `trellis-task-models.json5` (primary/fallback per Task role), `patch_wpelc8.py`, and Reload Window. Use after `cstl init --cursor` or when `providers.json` changes.
31
+ > **Retired:** `cstl-cursor2plus-setup` / Cursor++ local bundle are no longer product surfaces. Do not run patch scripts; product path is Native Cursor.
32
32
 
33
33
  ## Common Paths (Cursor)
34
34
 
@@ -59,8 +59,6 @@ smart-search-cli/
59
59
  └── references/
60
60
  cstl-micro-grill/
61
61
  └── SKILL.md
62
- cstl-cursor2plus-setup/
63
- └── SKILL.md
64
62
  ```
65
63
 
66
64
  `SKILL.md` should tell the AI:
@@ -5,27 +5,29 @@ description: "Create or improve Trellis-compatible agent skills. Use when the us
5
5
 
6
6
  # Trellis Skill Creator
7
7
 
8
- Create high-quality skills for Trellis-managed projects and Trellis bundled templates.
8
+ Create high-quality skills for Trellis-managed projects and Trellis bundled templates. This unified guide covers general authoring method plus Trellis packaging constraints.
9
9
 
10
10
  This skill is the authoring and review guide for skill files. It is not the local Trellis architecture map. Use `cstl-meta` first when the user needs to understand or customize `.cstl/`, hooks, settings, commands, prompts, workflows, agents, or platform directory layout.
11
11
 
12
12
  ## Hard Constraints
13
13
 
14
14
  - Always inspect existing skill directories and platform conventions before creating or changing a skill.
15
- - Always keep `SKILL.md` short, English-language, and focused on trigger, constraints, workflow, references, and boundaries.
15
+ - Always keep `SKILL.md` under 500 lines, in English, and focused on trigger, constraints, workflow, references, and boundaries.
16
16
  - Always use lowercase letters, numbers, and hyphens in the frontmatter `name`.
17
- - Always write a trigger-rich frontmatter `description` that states what the skill does and when it should trigger.
17
+ - Always write a trigger-rich frontmatter `description` that states what the skill does (WHAT) and when it should trigger (WHEN).
18
18
  - Always place safety, sequencing, and reliability rules in a `## Hard Constraints` section before `## Workflow`.
19
+ - Always write Hard Constraints (and any other rule list) as imperative one-liners ("Always X. Never Y."). Never bury rules in prose paragraphs.
19
20
  - Always move long guidance, examples, prompts, and reference material into directly linked files.
20
21
  - Always make helper scripts deterministic, runnable from the skill directory, and explicit about inputs and outputs.
22
+ - Never repeat the same rule in two sections — Hard Constraints is the single source of truth.
21
23
  - Never duplicate `cstl-meta` architecture guidance or project-private conventions inside a public Trellis skill.
22
24
  - Never edit Cursor's built-in `create-skill`; create or update Trellis-compatible skill files instead.
23
25
 
24
26
  ## Workflow
25
27
 
26
28
  1. Classify the target skill location and read `references/cstl-skill-locations.md`.
27
- 2. Gather the skill purpose, trigger scenarios, target users, required tools, output shape, and existing local patterns.
28
- 3. Draft or revise `SKILL.md` using `references/authoring-rules.md`.
29
+ 2. Gather requirements (six elements): purpose and scope, trigger scenarios, target location, domain constraints (tools / APIs / reliability), output style, and existing patterns. Infer from conversation context when available; ask the user when discrete choices are ambiguous. Capture tool budget and overlap with existing skills.
30
+ 3. Design, then draft: choose a specific skill name, write a trigger-rich description, decide script / no-script, and define success and stop criteria. Draft or revise `SKILL.md` using `references/authoring-rules.md` and `references/general-authoring.md`.
29
31
  4. Add `references/`, `examples/`, `prompts/`, or `scripts/` only when they reduce entry-file size or make execution more deterministic.
30
32
  5. Verify the result with `references/review-checklist.md`.
31
33
  6. Report changed files, validation performed, and any boundaries or follow-up work.
@@ -33,7 +35,8 @@ This skill is the authoring and review guide for skill files. It is not the loca
33
35
  ## References
34
36
 
35
37
  - `references/cstl-skill-locations.md`: Choose project-local, shared, platform-specific, or upstream bundled skill locations.
36
- - `references/authoring-rules.md`: Frontmatter, trigger descriptions, hard constraints, progressive disclosure, deterministic scripts, and anti-patterns.
38
+ - `references/authoring-rules.md`: Frontmatter, trigger descriptions, hard-constraint form, progressive disclosure, writing-for-agents techniques, deterministic scripts, and anti-patterns.
39
+ - `references/general-authoring.md`: General authoring method — principles, directory layout, patterns, utility scripts, and the minimal template.
37
40
  - `references/review-checklist.md`: Final quality checklist before handing off a skill change.
38
41
 
39
42
  ## When NOT To Use
@@ -41,4 +44,4 @@ This skill is the authoring and review guide for skill files. It is not the loca
41
44
  - Do not use for general Trellis architecture discovery; use `cstl-meta`.
42
45
  - Do not use for project coding conventions that belong in `.cstl/spec/`.
43
46
  - Do not use for one-off commands or prompts unless the user wants a durable auto-triggered capability.
44
- - Do not use for non-Trellis global skill installation or platform configuration unless the user explicitly asks for that scope.
47
+ - Do not use for non-Trellis global skill installation or platform configuration unless the user explicitly asks for that scope.
@@ -2,6 +2,8 @@
2
2
 
3
3
  Use these rules when creating or reviewing a Trellis-compatible skill.
4
4
 
5
+ Imperative constraints (length, English, `name` charset, WHAT+WHEN description, Hard Constraints placement and form, no duplicated rules, no `cstl-meta` duplication) live in `SKILL.md` Hard Constraints. This file shows how to apply them.
6
+
5
7
  ## Required Shape
6
8
 
7
9
  Every active skill directory needs a `SKILL.md` with YAML frontmatter:
@@ -13,19 +15,23 @@ description: Specific capability and trigger scenarios.
13
15
  ---
14
16
  ```
15
17
 
16
- Rules:
17
-
18
- - Use lowercase letters, numbers, and hyphens in `name`.
19
- - Write `description` in third person because platforms inject it into tool or skill discovery prompts.
20
- - Include both what the skill does and when it should trigger.
21
- - Keep `SKILL.md` under 500 lines and usually far shorter.
22
- - Keep `SKILL.md` in English unless the target platform or user explicitly requires another language.
18
+ Keep the body focused on trigger, constraints, workflow, references, and boundaries. Long guidance belongs in directly linked files.
23
19
 
24
20
  ## Description Quality
25
21
 
26
- The description is the trigger surface. It should contain concrete task nouns and user-intent phrases.
22
+ The description is the trigger surface. Platforms inject it into discovery prompts, so write it in third person and include concrete task nouns plus user-intent phrases.
23
+
24
+ 1. **Write in third person**
25
+ - Good: "Processes Excel files and generates reports"
26
+ - Avoid: "I can help you process Excel files"
27
+ 2. **Be specific and include trigger terms**
28
+ - Good: "Fetch and verify one specific news event with minimal tool calls. Use when user asks whether a specific claim is true."
29
+ - Vague: "Helps with news."
30
+ 3. **Include both WHAT and WHEN**
31
+ - WHAT: what the skill does (specific capabilities)
32
+ - WHEN: when the agent should use it (trigger scenarios)
27
33
 
28
- Good:
34
+ Trellis example:
29
35
 
30
36
  ```yaml
31
37
  description: "Create or improve Trellis-compatible agent skills. Use when the user asks to author a project-local skill, shared .agents skill, platform-specific skill, or upstream Trellis bundled skill."
@@ -45,9 +51,9 @@ Checklist:
45
51
  - Avoids broad utility wording such as "helper", "tools", or "useful".
46
52
  - Does not claim support for platforms or files the skill does not cover.
47
53
 
48
- ## Hard Constraints
54
+ ## Hard Constraints Form
49
55
 
50
- Put a `## Hard Constraints` section near the top, before `## Workflow`, when the skill has safety, sequencing, scope, or reliability rules.
56
+ Put `## Hard Constraints` near the top, before `## Workflow`, when the skill has safety, sequencing, scope, or reliability rules.
51
57
 
52
58
  Write constraints as imperative one-liners:
53
59
 
@@ -55,7 +61,7 @@ Write constraints as imperative one-liners:
55
61
  - Never modify global configuration without explicit user approval.
56
62
  - Always run the validator before final output.
57
63
 
58
- Do not bury constraints in paragraphs. Do not repeat the same rule in another section; make Hard Constraints the single source of truth.
64
+ Do not bury constraints in paragraphs. Do not restate the same rule elsewhere; Hard Constraints is the only rule list.
59
65
 
60
66
  ## Progressive Disclosure
61
67
 
@@ -72,6 +78,18 @@ Good candidates for references:
72
78
 
73
79
  Keep references one level deep and link them directly from `SKILL.md`. Avoid reference chains where one reference requires reading another reference before it is useful.
74
80
 
81
+ ## Writing for agents (four techniques)
82
+
83
+ Write instructions for how agents consume text: tokens in, behavior out. Apply these techniques to `SKILL.md`, descriptions, and references.
84
+
85
+ 1. **Leading words** — Open each instruction with the load-bearing verb or decision; agents anchor behavior on the first tokens of a line or sentence. Criterion: the first two words of every instruction state the action, not the context. Bad: "After checking the environment, update the file." Good: "Inspect local files first, then edit."
86
+
87
+ 2. **No-op test** — Test redundancy by deleting the whole sentence, not a word. Criterion: if the skill still holds with the sentence removed, cut it; word-level trimming hides leftover redundancy. Bad: deleting "local" from "inspect local files" leaves the same ambiguity.
88
+
89
+ 3. **Negation anti-pattern** — Prefer positive wording over stacked "do not" instructions. Criterion: each "do not"/"never" line should be rewritable as a "do" statement or merged into an existing constraint. Bad: "Do not edit files you have not read." Good: "Read a file before editing it."
90
+
91
+ 4. **Context pointer wording** — Phrase references with their trigger branch so the agent knows when to load them. Criterion: every pointer names the condition or decision that should open it. Vague: "See authoring rules." Actionable: "Load `references/authoring-rules.md` when reviewing skill shape or descriptions."
92
+
75
93
  ## Deterministic Scripts
76
94
 
77
95
  Add scripts only when they make the skill more reliable than generated ad hoc code.
@@ -87,11 +105,67 @@ Script rules:
87
105
 
88
106
  ## Common Anti-Patterns
89
107
 
90
- - Vague frontmatter descriptions that can trigger on unrelated work.
91
- - A single skill that mixes unrelated workflows.
92
- - `SKILL.md` files that paste long prompts or full scripts instead of linking references.
93
- - Rules repeated in several sections with slightly different wording.
94
- - Missing stop conditions for broad search or expensive loops.
95
- - Commands that rely on shell variables set by a previous tool call.
108
+ ### Vague description or name
109
+
110
+ Vague frontmatter descriptions trigger on unrelated work.
111
+
112
+ - Good names: `processing-pdfs`, `render-mermaid`
113
+ - Avoid: `helper`, `utils`, `tools`
114
+
115
+ ### Mixing unrelated workflows
116
+
117
+ One skill should not address multiple unrelated concerns. Split into separate skills.
118
+
119
+ ### Pasting long prompts or full scripts into SKILL.md
120
+
121
+ Link references instead of inlining long material.
122
+
123
+ ### Repeated rules
124
+
125
+ Do not restate the same rule in several sections with slightly different wording.
126
+
127
+ ### Missing stop conditions
128
+
129
+ Multiple broad search loops without explicit exit criteria.
130
+
131
+ ### Cross-step variable sharing
132
+
133
+ Each tool call is independent and stateless. Shell variables set in one call do not exist in the next.
134
+
135
+ ```markdown
136
+ # Bad — variable $TS differs between Write and Bash calls
137
+ Write content to /tmp/data-$TS.txt # tool call 1: timestamp A
138
+ Bash: cmd --input /tmp/data-$TS.txt # tool call 2: timestamp B → file not found
139
+
140
+ # Good — use a fixed path; let the script handle dynamic naming internally
141
+ Write content to /var/skill-name/input.txt
142
+ Bash: cmd --input /var/skill-name/input.txt
143
+ ```
144
+
145
+ ### Exposing internal decisions as parameters
146
+
147
+ If a value can be determined by the script itself, do not expose it as a parameter.
148
+
149
+ ```markdown
150
+ # Bad — unnecessary parameters the agent must coordinate
151
+ cmd --input file.txt --output out.png --format png --theme default
152
+
153
+ # Good — only the essential input; script decides the rest
154
+ cmd --input file.txt
155
+ ```
156
+
157
+ ### Too many options
158
+
159
+ ```markdown
160
+ # Bad
161
+ "You can use pypdf, or pdfplumber, or PyMuPDF, or..."
162
+
163
+ # Good — provide a default with an escape hatch
164
+ "Use pdfplumber for text extraction.
165
+ For scanned PDFs requiring OCR, use pdf2image with pytesseract instead."
166
+ ```
167
+
168
+ ### Broken or private references
169
+
96
170
  - References to files, scripts, or examples that do not exist.
97
- - Project-private conventions added to public Trellis bundled skills.
171
+ - Project-private conventions added to public Trellis bundled skills.
@@ -0,0 +1,189 @@
1
+ # General Skill Authoring
2
+
3
+ Method and patterns for writing reusable agent skills. Imperative rules live in `SKILL.md` Hard Constraints; this file explains how to apply them. For Trellis location choice, read `cstl-skill-locations.md`. For description wording and anti-patterns, read `authoring-rules.md`.
4
+
5
+ ## Gather Requirements
6
+
7
+ Collect these six elements before writing files:
8
+
9
+ 1. **Purpose and scope**: What specific workflow should this skill solve?
10
+ 2. **Trigger scenarios**: When should the agent automatically use it?
11
+ 3. **Target location**: Project skill, shared skill, bundled template, or personal skill?
12
+ 4. **Domain constraints**: Required tools, APIs, reliability constraints.
13
+ 5. **Output style**: Report template, checklist, strict schema, etc.
14
+ 6. **Existing patterns**: Are there existing skills or conventions to follow?
15
+
16
+ ### Inferring from Context
17
+
18
+ If previous conversation already surfaced workflows, patterns, or domain knowledge, infer the skill from that context.
19
+
20
+ Ask the user when requirements are ambiguous and discrete choices are needed.
21
+
22
+ ## Directory Layout
23
+
24
+ ```
25
+ skill-name/
26
+ ├── SKILL.md # required
27
+ ├── scripts/ # optional utility scripts
28
+ ├── bin/ # optional compiled binaries
29
+ ├── references/ # optional detailed docs (preferred over a single reference.md)
30
+ ├── examples/ # optional samples
31
+ └── prompts/ # optional long prompts
32
+ ```
33
+
34
+ Keep the entry file short. Put long guidance one level deep under `references/` and link it from `SKILL.md`.
35
+
36
+ Generic storage scopes (`~/.agents/skills/` vs project `.agents/skills/`) are not enough for Trellis work. Use `cstl-skill-locations.md` to pick the target directory.
37
+
38
+ ## Core Authoring Principles
39
+
40
+ ### 1. Concise is Key
41
+
42
+ The context window is shared with conversation history, other skills, and requests. Every token competes for space.
43
+
44
+ Default assumption: the agent is already very smart. Only add context it does not already have.
45
+
46
+ Challenge each piece of information:
47
+
48
+ - Does the agent really need this explanation?
49
+ - Can I assume the agent knows this?
50
+ - Does this paragraph justify its token cost?
51
+
52
+ ### 2. Progressive Disclosure
53
+
54
+ Put essential information in `SKILL.md`; detailed reference material in separate files that the agent reads only when needed.
55
+
56
+ Keep references one level deep — link directly from `SKILL.md`. Nested reference chains may result in partial reads.
57
+
58
+ ### 3. One File, One Concern
59
+
60
+ Each skill should address a single workflow. If a skill tries to do too many things, split it.
61
+
62
+ ### 4. Maximize Determinism
63
+
64
+ Skills run through multiple independent tool calls. Each call is stateless — no shared session or persistent variables between calls.
65
+
66
+ Eliminate ambiguity at every layer — description, workflow, script parameters, and output format.
67
+
68
+ - Internalize decisions: if a value can be decided inside a script (output path, temp filename, timestamp), do not expose it as a parameter.
69
+ - Use fixed literal paths in workflows. The agent copies commands verbatim. Never rely on shell variables staying consistent across separate tool calls.
70
+ - Minimize script parameters. Only require what the agent must provide.
71
+ - Scripts return structured JSON to stdout so the agent can parse the result deterministically.
72
+ - Specify an exact tool-call sequence, for example: "Exactly 3 steps: write file → run command → deliver output."
73
+ - Add stop conditions. Prevent open-ended tool loops for expensive operations.
74
+
75
+ ### 5. Set Appropriate Degrees of Freedom
76
+
77
+ Match specificity to the task's fragility:
78
+
79
+ | Freedom Level | When to Use | Example |
80
+ |---------------|-------------|---------|
81
+ | **High** (text instructions) | Multiple valid approaches, context-dependent | Code review guidelines |
82
+ | **Medium** (pseudocode / templates) | Preferred pattern with acceptable variation | Report generation |
83
+ | **Low** (specific scripts) | Fragile operations, consistency critical | Database migrations |
84
+
85
+ ## Recommended SKILL.md Sections
86
+
87
+ 1. Goal
88
+ 2. Hard Constraints (imperative one-liners; placed before Workflow)
89
+ 3. Workflow
90
+ 4. Output Template
91
+ 5. When NOT to use this skill
92
+
93
+ ## Common Patterns
94
+
95
+ ### Workflow Pattern
96
+
97
+ Break operations into explicit steps with a clear tool-call sequence:
98
+
99
+ ```markdown
100
+ ## Workflow
101
+
102
+ 1. Gather input data
103
+ 2. Process: `<exact command the agent should run>`
104
+ 3. Parse output, proceed to the next step
105
+ 4. Stop when the condition is met
106
+ ```
107
+
108
+ ### Template Pattern
109
+
110
+ Provide output format templates:
111
+
112
+ ````markdown
113
+ ## Output Template
114
+
115
+ ```markdown
116
+ # [Title]
117
+
118
+ ## Summary
119
+ [One-paragraph overview]
120
+
121
+ ## Findings
122
+ - Finding 1 with supporting data
123
+ - Finding 2 with supporting data
124
+ ```
125
+ ````
126
+
127
+ ### Conditional Workflow Pattern
128
+
129
+ Guide through decision points:
130
+
131
+ ```markdown
132
+ ## Workflow
133
+
134
+ 1. Determine the type:
135
+ **Creating new?** → Follow "Creation workflow" below
136
+ **Editing existing?** → Follow "Editing workflow" below
137
+ ```
138
+
139
+ ### Feedback Loop Pattern
140
+
141
+ For quality-critical tasks, implement validation:
142
+
143
+ ```markdown
144
+ 1. Make edits
145
+ 2. Validate: `python scripts/validate.py output/`
146
+ 3. If validation fails → fix and re-validate
147
+ 4. Only proceed when validation passes
148
+ ```
149
+
150
+ ## Utility Scripts
151
+
152
+ Pre-made scripts are more reliable than generated code, save tokens, and keep behavior consistent.
153
+
154
+ Script design:
155
+
156
+ - Only expose parameters the agent must supply (input data, mode selection).
157
+ - Let the script handle internal decisions (output path, temp files, format defaults).
158
+ - Return results as structured JSON to stdout.
159
+ - State whether the agent should **execute** the script or **read** it as reference.
160
+
161
+ ## Minimal Template
162
+
163
+ ```markdown
164
+ ---
165
+ name: skill-name
166
+ description: Specific capability and trigger scenarios.
167
+ ---
168
+
169
+ # Skill Name
170
+
171
+ ## Goal
172
+ One clear objective.
173
+
174
+ ## Hard Constraints
175
+ - Always X. Never Y.
176
+ - Always validate the input before step 2.
177
+ - Never call the API more than 5 times per run.
178
+
179
+ ## Workflow
180
+ 1. Step one
181
+ 2. Step two
182
+ 3. Stop when condition met
183
+
184
+ ## Output Template
185
+ Required output structure.
186
+
187
+ ## When NOT to use this skill
188
+ - Boundary cases.
189
+ ```