@blxzer/cursor-trellis 0.4.1 → 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 (337) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +25 -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 +144 -41
  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 +12 -45
  33. package/dist/configurators/workflow.js.map +1 -1
  34. package/dist/constants/paths.d.ts +13 -0
  35. package/dist/constants/paths.d.ts.map +1 -1
  36. package/dist/constants/paths.js +17 -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-check/SKILL.md +1 -1
  40. package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/hooks-and-settings.md +2 -2
  41. package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/overview.md +1 -1
  42. package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/skills-and-commands.md +2 -4
  43. package/dist/templates/common/bundled-skills/cstl-skill-creator/SKILL.md +10 -7
  44. package/dist/templates/common/bundled-skills/cstl-skill-creator/references/authoring-rules.md +93 -19
  45. package/dist/templates/common/bundled-skills/cstl-skill-creator/references/general-authoring.md +189 -0
  46. package/dist/templates/common/bundled-skills/cstl-skill-creator/references/review-checklist.md +10 -5
  47. package/dist/templates/common/commands/continue.md +6 -5
  48. package/dist/templates/common/index.d.ts +20 -0
  49. package/dist/templates/common/index.d.ts.map +1 -1
  50. package/dist/templates/common/index.js +21 -2
  51. package/dist/templates/common/index.js.map +1 -1
  52. package/dist/templates/common/optional-skills/chrome-cdp/SKILL.md +179 -0
  53. package/dist/templates/common/optional-skills/chrome-cdp/examples/fetch-hook-api-capture.md +149 -0
  54. package/dist/templates/common/optional-skills/chrome-cdp/scripts/cdp.mjs +903 -0
  55. package/dist/templates/common/skills/brainstorm.md +2 -2
  56. package/dist/templates/cursor/agents/cstl-check.md +2 -2
  57. package/dist/templates/cursor/agents/cstl-implement.md +1 -1
  58. package/dist/templates/cursor/agents/cstl-research.md +2 -2
  59. package/dist/templates/cursor/fixtures/expected-rules.d.ts +1 -1
  60. package/dist/templates/cursor/fixtures/expected-rules.d.ts.map +1 -1
  61. package/dist/templates/cursor/fixtures/expected-rules.js +7 -24
  62. package/dist/templates/cursor/fixtures/expected-rules.js.map +1 -1
  63. package/dist/templates/cursor/hooks.json +4 -0
  64. package/dist/templates/cursor/index.d.ts +1 -1
  65. package/dist/templates/cursor/index.js +1 -1
  66. package/dist/templates/cursor/rules/cstl-bootstrap.mdc +17 -0
  67. package/dist/templates/markdown/agents.md +36 -3
  68. package/dist/templates/markdown/{spec/guides → framework}/cursor-native-modes-guide.md.txt +13 -10
  69. package/dist/templates/markdown/{spec/guides → framework}/cursor-subagent-policy.md.txt +63 -127
  70. package/dist/templates/markdown/framework/dogfood-only-surfaces.md.txt +29 -0
  71. package/dist/templates/markdown/{spec/guides → framework}/execution-strategy.md.txt +2 -0
  72. package/dist/templates/markdown/framework/index.md.txt +31 -0
  73. package/dist/templates/markdown/framework/internal-skills-cursor-reachability.md.txt +45 -0
  74. package/dist/templates/markdown/framework/middleware-protocol.md.txt +83 -0
  75. package/dist/templates/markdown/framework/parallel-first-execution.md.txt +78 -0
  76. package/dist/templates/markdown/framework/prd-grill-frontier.md.txt +83 -0
  77. package/dist/templates/markdown/framework/release-boundary.md.txt +30 -0
  78. package/dist/templates/markdown/{spec/guides → framework}/retrieval-daily-guide.md.txt +1 -1
  79. package/dist/templates/markdown/framework/upgrade.md.txt +15 -0
  80. package/dist/templates/markdown/{spec/guides → framework}/verification-strength-guide.md.txt +2 -2
  81. package/dist/templates/markdown/index.d.ts +26 -10
  82. package/dist/templates/markdown/index.d.ts.map +1 -1
  83. package/dist/templates/markdown/index.js +87 -11
  84. package/dist/templates/markdown/index.js.map +1 -1
  85. package/dist/templates/markdown/prompts/run-semantic-slice-12.md.txt +1 -1
  86. package/dist/templates/markdown/spec/guides/index.md.txt +5 -19
  87. package/dist/templates/markdown/spec/guides/prototype-guide.md.txt +10 -10
  88. package/dist/templates/markdown/spec/guides/test-discipline-guide.md.txt +1 -1
  89. package/dist/templates/shared-hooks/event-bridge.py +60 -0
  90. package/dist/templates/shared-hooks/index.d.ts +1 -1
  91. package/dist/templates/shared-hooks/index.d.ts.map +1 -1
  92. package/dist/templates/shared-hooks/index.js +1 -0
  93. package/dist/templates/shared-hooks/index.js.map +1 -1
  94. package/dist/templates/shared-hooks/session-start.py +19 -2
  95. package/dist/templates/trellis/CONTEXT.md +63 -3
  96. package/dist/templates/trellis/config.yaml +1 -1
  97. package/dist/templates/trellis/gitignore.txt +39 -39
  98. package/dist/templates/trellis/index.d.ts +12 -0
  99. package/dist/templates/trellis/index.d.ts.map +1 -1
  100. package/dist/templates/trellis/index.js +73 -15
  101. package/dist/templates/trellis/index.js.map +1 -1
  102. package/dist/templates/trellis/pool/README.md +12 -3
  103. package/dist/templates/trellis/pool/plan.md +24 -5
  104. package/dist/templates/trellis/scripts/common/adapter_middleware.py +158 -0
  105. package/dist/templates/trellis/scripts/common/artifact_locale.py +12 -3
  106. package/dist/templates/trellis/scripts/common/cursor_retrieval_env.py +5 -2
  107. package/dist/templates/trellis/scripts/common/full_quality.py +237 -0
  108. package/dist/templates/trellis/scripts/common/git.py +6 -0
  109. package/dist/templates/trellis/scripts/common/git_context.py +17 -5
  110. package/dist/templates/trellis/scripts/common/kernel_command.py +367 -0
  111. package/dist/templates/trellis/scripts/common/lite_context.py +280 -0
  112. package/dist/templates/trellis/scripts/common/ondemand_topology.py +225 -0
  113. package/dist/templates/trellis/scripts/common/parent_orchestration.py +1 -1
  114. package/dist/templates/trellis/scripts/common/pool_store.py +16 -4
  115. package/dist/templates/trellis/scripts/common/retrieval_agent_instructions.py +2 -2
  116. package/dist/templates/trellis/scripts/common/session_context.py +28 -2
  117. package/dist/templates/trellis/scripts/common/task_gates.py +73 -12
  118. package/dist/templates/trellis/scripts/common/task_map.py +42 -9
  119. package/dist/templates/trellis/scripts/common/task_store.py +293 -61
  120. package/dist/templates/trellis/scripts/common/test_adapter_middleware.py +56 -0
  121. package/dist/templates/trellis/scripts/common/test_depends_mode_block.py +9 -0
  122. package/dist/templates/trellis/scripts/common/test_full_quality.py +197 -0
  123. package/dist/templates/trellis/scripts/common/test_kernel_command.py +326 -0
  124. package/dist/templates/trellis/scripts/common/test_lite_path.py +190 -0
  125. package/dist/templates/trellis/scripts/common/test_observable_defaults.py +10 -4
  126. package/dist/templates/trellis/scripts/common/test_ondemand_topology.py +122 -0
  127. package/dist/templates/trellis/scripts/common/test_pool_store.py +17 -0
  128. package/dist/templates/trellis/scripts/common/test_task_store_kernel_patch.py +163 -0
  129. package/dist/templates/trellis/scripts/common/workflow_phase.py +3 -0
  130. package/dist/templates/trellis/scripts/cursor_retrieval_probe_prompt.md +4 -5
  131. package/dist/templates/trellis/scripts/get_context.py +1 -0
  132. package/dist/templates/trellis/scripts/pool.py +5 -0
  133. package/dist/templates/trellis/scripts/task.py +83 -7
  134. package/dist/templates/trellis/workflow.md +109 -23
  135. package/dist/utils/cursor-retrieval-env.d.ts +2 -1
  136. package/dist/utils/cursor-retrieval-env.d.ts.map +1 -1
  137. package/dist/utils/cursor-retrieval-env.js +3 -2
  138. package/dist/utils/cursor-retrieval-env.js.map +1 -1
  139. package/dist/utils/cursor2plus-residue-cleanup.d.ts +38 -0
  140. package/dist/utils/cursor2plus-residue-cleanup.d.ts.map +1 -0
  141. package/dist/utils/cursor2plus-residue-cleanup.js +145 -0
  142. package/dist/utils/cursor2plus-residue-cleanup.js.map +1 -0
  143. package/dist/utils/manifest-prune.d.ts.map +1 -1
  144. package/dist/utils/manifest-prune.js +7 -2
  145. package/dist/utils/manifest-prune.js.map +1 -1
  146. package/dist/utils/p36-upgrade.d.ts +62 -0
  147. package/dist/utils/p36-upgrade.d.ts.map +1 -0
  148. package/dist/utils/p36-upgrade.js +160 -0
  149. package/dist/utils/p36-upgrade.js.map +1 -0
  150. package/dist/utils/project-capabilities.d.ts +1 -12
  151. package/dist/utils/project-capabilities.d.ts.map +1 -1
  152. package/dist/utils/project-capabilities.js +3 -100
  153. package/dist/utils/project-capabilities.js.map +1 -1
  154. package/dist/utils/readiness.d.ts +10 -0
  155. package/dist/utils/readiness.d.ts.map +1 -1
  156. package/dist/utils/readiness.js +58 -26
  157. package/dist/utils/readiness.js.map +1 -1
  158. package/dist/utils/retrieval-agent-instructions.js +1 -1
  159. package/dist/utils/retrieval-agent-instructions.js.map +1 -1
  160. package/dist/utils/retrieval-execution-telemetry.js +1 -1
  161. package/dist/utils/retrieval-execution-telemetry.js.map +1 -1
  162. package/dist/utils/template-hash.d.ts.map +1 -1
  163. package/dist/utils/template-hash.js +11 -1
  164. package/dist/utils/template-hash.js.map +1 -1
  165. package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
  166. package/dist/utils/uninstall-scrubbers.js +52 -14
  167. package/dist/utils/uninstall-scrubbers.js.map +1 -1
  168. package/dist/utils/update-rollout-report.d.ts +14 -0
  169. package/dist/utils/update-rollout-report.d.ts.map +1 -1
  170. package/dist/utils/update-rollout-report.js +1 -0
  171. package/dist/utils/update-rollout-report.js.map +1 -1
  172. package/dist/utils/workflow-ownership.d.ts +1 -1
  173. package/dist/utils/workflow-ownership.js +4 -4
  174. package/dist/utils/workflow-ownership.js.map +1 -1
  175. package/package.json +5 -4
  176. package/scripts/postinstall.js +6 -7
  177. package/dist/commands/campaign/canvas-render.d.ts +0 -68
  178. package/dist/commands/campaign/canvas-render.d.ts.map +0 -1
  179. package/dist/commands/campaign/canvas-render.js +0 -414
  180. package/dist/commands/campaign/canvas-render.js.map +0 -1
  181. package/dist/commands/campaign/compose.d.ts +0 -15
  182. package/dist/commands/campaign/compose.d.ts.map +0 -1
  183. package/dist/commands/campaign/compose.js +0 -110
  184. package/dist/commands/campaign/compose.js.map +0 -1
  185. package/dist/commands/campaign/index.d.ts +0 -13
  186. package/dist/commands/campaign/index.d.ts.map +0 -1
  187. package/dist/commands/campaign/index.js +0 -134
  188. package/dist/commands/campaign/index.js.map +0 -1
  189. package/dist/commands/campaign/kind-map.d.ts +0 -6
  190. package/dist/commands/campaign/kind-map.d.ts.map +0 -1
  191. package/dist/commands/campaign/kind-map.js +0 -21
  192. package/dist/commands/campaign/kind-map.js.map +0 -1
  193. package/dist/commands/campaign/mcp-server.d.ts +0 -6
  194. package/dist/commands/campaign/mcp-server.d.ts.map +0 -1
  195. package/dist/commands/campaign/mcp-server.js +0 -167
  196. package/dist/commands/campaign/mcp-server.js.map +0 -1
  197. package/dist/commands/campaign/render.d.ts +0 -5
  198. package/dist/commands/campaign/render.d.ts.map +0 -1
  199. package/dist/commands/campaign/render.js +0 -103
  200. package/dist/commands/campaign/render.js.map +0 -1
  201. package/dist/commands/campaign/trellis-load.d.ts +0 -13
  202. package/dist/commands/campaign/trellis-load.d.ts.map +0 -1
  203. package/dist/commands/campaign/trellis-load.js +0 -122
  204. package/dist/commands/campaign/trellis-load.js.map +0 -1
  205. package/dist/commands/campaign/types.d.ts +0 -61
  206. package/dist/commands/campaign/types.d.ts.map +0 -1
  207. package/dist/commands/campaign/types.js +0 -3
  208. package/dist/commands/campaign/types.js.map +0 -1
  209. package/dist/commands/goal/index.d.ts +0 -3
  210. package/dist/commands/goal/index.d.ts.map +0 -1
  211. package/dist/commands/goal/index.js +0 -159
  212. package/dist/commands/goal/index.js.map +0 -1
  213. package/dist/commands/goal/review.d.ts +0 -6
  214. package/dist/commands/goal/review.d.ts.map +0 -1
  215. package/dist/commands/goal/review.js +0 -28
  216. package/dist/commands/goal/review.js.map +0 -1
  217. package/dist/commands/rpc/client.d.ts +0 -51
  218. package/dist/commands/rpc/client.d.ts.map +0 -1
  219. package/dist/commands/rpc/client.js +0 -147
  220. package/dist/commands/rpc/client.js.map +0 -1
  221. package/dist/commands/rpc/index.d.ts +0 -10
  222. package/dist/commands/rpc/index.d.ts.map +0 -1
  223. package/dist/commands/rpc/index.js +0 -157
  224. package/dist/commands/rpc/index.js.map +0 -1
  225. package/dist/commands/rpc/serve.d.ts +0 -23
  226. package/dist/commands/rpc/serve.d.ts.map +0 -1
  227. package/dist/commands/rpc/serve.js +0 -60
  228. package/dist/commands/rpc/serve.js.map +0 -1
  229. package/dist/commands/rpc/smoke.d.ts +0 -16
  230. package/dist/commands/rpc/smoke.d.ts.map +0 -1
  231. package/dist/commands/rpc/smoke.js +0 -92
  232. package/dist/commands/rpc/smoke.js.map +0 -1
  233. package/dist/commands/sdk/index.d.ts +0 -9
  234. package/dist/commands/sdk/index.d.ts.map +0 -1
  235. package/dist/commands/sdk/index.js +0 -58
  236. package/dist/commands/sdk/index.js.map +0 -1
  237. package/dist/commands/sdk/run.d.ts +0 -42
  238. package/dist/commands/sdk/run.d.ts.map +0 -1
  239. package/dist/commands/sdk/run.js +0 -220
  240. package/dist/commands/sdk/run.js.map +0 -1
  241. package/dist/commands/sdk/status.d.ts +0 -14
  242. package/dist/commands/sdk/status.d.ts.map +0 -1
  243. package/dist/commands/sdk/status.js +0 -69
  244. package/dist/commands/sdk/status.js.map +0 -1
  245. package/dist/configurators/cursor2plus-local.d.ts +0 -6
  246. package/dist/configurators/cursor2plus-local.d.ts.map +0 -1
  247. package/dist/configurators/cursor2plus-local.js +0 -21
  248. package/dist/configurators/cursor2plus-local.js.map +0 -1
  249. package/dist/goal/action-packet.d.ts +0 -89
  250. package/dist/goal/action-packet.d.ts.map +0 -1
  251. package/dist/goal/action-packet.js +0 -113
  252. package/dist/goal/action-packet.js.map +0 -1
  253. package/dist/goal/audit.d.ts +0 -14
  254. package/dist/goal/audit.d.ts.map +0 -1
  255. package/dist/goal/audit.js +0 -12
  256. package/dist/goal/audit.js.map +0 -1
  257. package/dist/goal/constants.d.ts +0 -26
  258. package/dist/goal/constants.d.ts.map +0 -1
  259. package/dist/goal/constants.js +0 -24
  260. package/dist/goal/constants.js.map +0 -1
  261. package/dist/goal/paths.d.ts +0 -8
  262. package/dist/goal/paths.d.ts.map +0 -1
  263. package/dist/goal/paths.js +0 -36
  264. package/dist/goal/paths.js.map +0 -1
  265. package/dist/goal/preflight.d.ts +0 -21
  266. package/dist/goal/preflight.d.ts.map +0 -1
  267. package/dist/goal/preflight.js +0 -97
  268. package/dist/goal/preflight.js.map +0 -1
  269. package/dist/goal/review-seam.d.ts +0 -44
  270. package/dist/goal/review-seam.d.ts.map +0 -1
  271. package/dist/goal/review-seam.js +0 -153
  272. package/dist/goal/review-seam.js.map +0 -1
  273. package/dist/goal/reviewer-rules.d.ts +0 -13
  274. package/dist/goal/reviewer-rules.d.ts.map +0 -1
  275. package/dist/goal/reviewer-rules.js +0 -153
  276. package/dist/goal/reviewer-rules.js.map +0 -1
  277. package/dist/goal/reviewer.d.ts +0 -9
  278. package/dist/goal/reviewer.d.ts.map +0 -1
  279. package/dist/goal/reviewer.js +0 -54
  280. package/dist/goal/reviewer.js.map +0 -1
  281. package/dist/goal/runtime.d.ts +0 -32
  282. package/dist/goal/runtime.d.ts.map +0 -1
  283. package/dist/goal/runtime.js +0 -242
  284. package/dist/goal/runtime.js.map +0 -1
  285. package/dist/goal/sdk-client.d.ts +0 -10
  286. package/dist/goal/sdk-client.d.ts.map +0 -1
  287. package/dist/goal/sdk-client.js +0 -34
  288. package/dist/goal/sdk-client.js.map +0 -1
  289. package/dist/goal/state.d.ts +0 -40
  290. package/dist/goal/state.d.ts.map +0 -1
  291. package/dist/goal/state.js +0 -37
  292. package/dist/goal/state.js.map +0 -1
  293. package/dist/goal/task-triggers.d.ts +0 -15
  294. package/dist/goal/task-triggers.d.ts.map +0 -1
  295. package/dist/goal/task-triggers.js +0 -23
  296. package/dist/goal/task-triggers.js.map +0 -1
  297. package/dist/goal/walls.d.ts +0 -12
  298. package/dist/goal/walls.d.ts.map +0 -1
  299. package/dist/goal/walls.js +0 -65
  300. package/dist/goal/walls.js.map +0 -1
  301. package/dist/goal/worker-prompt.d.ts +0 -13
  302. package/dist/goal/worker-prompt.d.ts.map +0 -1
  303. package/dist/goal/worker-prompt.js +0 -41
  304. package/dist/goal/worker-prompt.js.map +0 -1
  305. package/dist/goal/worker.d.ts +0 -42
  306. package/dist/goal/worker.d.ts.map +0 -1
  307. package/dist/goal/worker.js +0 -180
  308. package/dist/goal/worker.js.map +0 -1
  309. package/dist/templates/common/bundled-skills/cstl-cursor2plus-setup/SKILL.md +0 -63
  310. package/dist/templates/cursor/commands/cursor2plus-setup.md +0 -82
  311. package/dist/templates/cursor/rules/cstl-cursor-modes.mdc +0 -32
  312. package/dist/templates/cursor/rules/cstl-session-rename.mdc +0 -31
  313. package/dist/templates/cursor/rules/cstl-subagent-dispatch.mdc +0 -34
  314. package/dist/templates/cursor/rules/cstl-triage.mdc +0 -36
  315. package/dist/templates/cursor/rules/retrieval-routing.mdc +0 -78
  316. package/dist/templates/markdown/spec/guides/cursor-trellis-release-coexistence-guide.md.txt +0 -166
  317. package/dist/templates/markdown/spec/guides/goal-release-regression-runbook.md.txt +0 -132
  318. package/dist/templates/trellis/local/README.md +0 -85
  319. package/dist/templates/trellis/local/config.local.json.example +0 -6
  320. package/dist/templates/trellis/local/index.d.ts +0 -8
  321. package/dist/templates/trellis/local/index.d.ts.map +0 -1
  322. package/dist/templates/trellis/local/index.js +0 -15
  323. package/dist/templates/trellis/local/index.js.map +0 -1
  324. package/dist/templates/trellis/local/patch_wpelc8.py +0 -421
  325. package/dist/templates/trellis/local/smoke.py +0 -94
  326. package/dist/templates/trellis/local/subagent-models.json.example +0 -4
  327. package/dist/templates/trellis/local/trellis-task-models.json.example +0 -10
  328. package/dist/templates/trellis/local/trellis-task-models.json5.example +0 -45
  329. package/dist/templates/trellis/local/trellis_task_models_config.py +0 -200
  330. package/dist/utils/cursor-sdk-gate.d.ts +0 -10
  331. package/dist/utils/cursor-sdk-gate.d.ts.map +0 -1
  332. package/dist/utils/cursor-sdk-gate.js +0 -32
  333. package/dist/utils/cursor-sdk-gate.js.map +0 -1
  334. /package/dist/templates/markdown/{spec/guides → framework}/artifact-locale-guide.md.txt +0 -0
  335. /package/dist/templates/markdown/{spec/guides → framework}/cursor-context-injection-guide.md.txt +0 -0
  336. /package/dist/templates/markdown/{spec/guides → framework}/cursor-semantic-compliance.md.txt +0 -0
  337. /package/dist/templates/markdown/{spec/guides → framework}/injection-budget-guide.md.txt +0 -0
@@ -1,9 +1,14 @@
1
1
  #!/usr/bin/env python3
2
2
  # -*- coding: utf-8 -*-
3
3
  """
4
- Task Management Script.
4
+ Thin Task shim over `cstl kernel --json`.
5
+
6
+ Write-path commands (create / start-execution / record-gate / archive / patch
7
+ via add-subtask and friends) submit a Kernel Command. Do not invent `cstl task`.
8
+ Select / dashboard / jsonl / parent-status stay Python overlays.
5
9
 
6
10
  Usage:
11
+ python task.py kernel # stdin JSON → cstl kernel --json
7
12
  python task.py create "<title>" [--slug <name>] [--assignee <dev>] [--priority P0|P1|P2|P3] [--parent <dir>] [--package <pkg>]
8
13
  python task.py add-context <dir> <file> <path> [reason] # Add jsonl entry
9
14
  python task.py validate <dir> # Validate jsonl files
@@ -39,6 +44,7 @@ Usage:
39
44
  from __future__ import annotations
40
45
 
41
46
  import argparse
47
+ import json
42
48
  import sys
43
49
  from datetime import datetime, timezone
44
50
  from pathlib import Path
@@ -58,12 +64,22 @@ from common.active_task import (
58
64
  resolve_selected_task,
59
65
  set_selected_task,
60
66
  )
61
- from common.io import read_json, write_json
67
+ from common.io import read_json
68
+ from common.kernel_command import (
69
+ KernelCliNotFound,
70
+ KernelCommandError,
71
+ kernel_expected_revision,
72
+ kernel_record_gate,
73
+ kernel_start,
74
+ print_kernel_error,
75
+ run_kernel_command,
76
+ )
62
77
  from common.task_dashboard import render_task_dashboard
63
78
  from common.cli_environment import optional_capability_note
64
79
  from common.task_gates import (
65
80
  BASELINE_GATE,
66
81
  build_reviewer_gate_record,
82
+ collect_kernel_projection_extras,
67
83
  read_strategy_contract,
68
84
  start_execution_repair_hints,
69
85
  validate_start_execution,
@@ -141,6 +157,27 @@ def _resolve_existing_task(task_input: str, repo_root):
141
157
  return full_path
142
158
 
143
159
 
160
+ def cmd_kernel(args: argparse.Namespace) -> int:
161
+ """Forward one JSON object on stdin to `cstl kernel --json`."""
162
+ _ = args
163
+ raw = sys.stdin.read()
164
+ try:
165
+ payload = json.loads(raw) if raw.strip() else {}
166
+ except json.JSONDecodeError as err:
167
+ print(colored(f"Error: stdin is not JSON: {err}", Colors.RED), file=sys.stderr)
168
+ return 1
169
+ if not isinstance(payload, dict):
170
+ print(colored("Error: Kernel request must be a JSON object", Colors.RED), file=sys.stderr)
171
+ return 1
172
+ try:
173
+ result = run_kernel_command(payload, cwd=get_repo_root())
174
+ except (KernelCliNotFound, KernelCommandError) as err:
175
+ print_kernel_error(err)
176
+ return 1
177
+ print(json.dumps(result, ensure_ascii=False))
178
+ return 0
179
+
180
+
144
181
  def cmd_dashboard(args: argparse.Namespace) -> int:
145
182
  """Show Task Dashboard without mutating selection or status."""
146
183
  _ = args
@@ -348,8 +385,24 @@ def cmd_start_execution(args: argparse.Namespace) -> int:
348
385
  }
349
386
  if task_data.get("status") == "planning":
350
387
  task_data["status"] = "in_progress"
351
- if not write_json(task_json_path, task_data):
352
- print(colored("Error: failed to write task.json", Colors.RED), file=sys.stderr)
388
+
389
+ extras = collect_kernel_projection_extras(task_data)
390
+ try:
391
+ expected = kernel_expected_revision(task_dir)
392
+ kernel_start(
393
+ task_dir,
394
+ task_data,
395
+ extras,
396
+ expected_revision=expected,
397
+ actor="task.py start-execution --approved",
398
+ idempotency_key=(
399
+ f"start:{task_data.get('id') or task_dir.name}:"
400
+ f"{task_data['execution_approval']['approved_at']}"
401
+ ),
402
+ evidence="task.py start-execution --approved",
403
+ )
404
+ except (KernelCliNotFound, KernelCommandError) as err:
405
+ print_kernel_error(err)
353
406
  return 1
354
407
 
355
408
  print(colored(f"✓ Execution approved for: {_repo_relative(task_dir, repo_root)}", Colors.GREEN))
@@ -394,8 +447,25 @@ def cmd_record_gate(args: argparse.Namespace) -> int:
394
447
 
395
448
  assert record is not None
396
449
  write_gate_record(task_data, args.transition, args.gate, record)
397
- if not write_json(task_json_path, task_data):
398
- print(colored("Error: failed to write task.json", Colors.RED), file=sys.stderr)
450
+ extras = collect_kernel_projection_extras(task_data)
451
+ try:
452
+ expected = kernel_expected_revision(task_dir)
453
+ kernel_record_gate(
454
+ task_dir,
455
+ expected_revision=expected,
456
+ actor="task.py record-gate",
457
+ idempotency_key=(
458
+ f"gate:{args.transition}:{args.gate}:"
459
+ f"{record.get('contract_fingerprint') or record.get('evidence')}"
460
+ ),
461
+ transition=args.transition,
462
+ gate=args.gate,
463
+ record=record,
464
+ extras=extras,
465
+ evidence=str(record.get("evidence") or args.evidence),
466
+ )
467
+ except (KernelCliNotFound, KernelCommandError) as err:
468
+ print_kernel_error(err)
399
469
  return 1
400
470
 
401
471
  print(colored(f"✓ Recorded gate: {args.transition}/{args.gate} = {record['result']}", Colors.GREEN))
@@ -656,11 +726,16 @@ def main() -> int:
656
726
  return 2
657
727
 
658
728
  parser = argparse.ArgumentParser(
659
- description="Task Management Script",
729
+ description="Thin Task shim over cstl kernel --json",
660
730
  formatter_class=argparse.RawDescriptionHelpFormatter,
661
731
  )
662
732
  subparsers = parser.add_subparsers(dest="command", help="Commands")
663
733
 
734
+ subparsers.add_parser(
735
+ "kernel",
736
+ help="Forward stdin JSON to `cstl kernel --json` (do not invent cstl task)",
737
+ )
738
+
664
739
  # create
665
740
  p_create = subparsers.add_parser("create", help="Create new task")
666
741
  p_create.add_argument("title", help="Task title")
@@ -989,6 +1064,7 @@ def main() -> int:
989
1064
  return 1
990
1065
 
991
1066
  commands = {
1067
+ "kernel": cmd_kernel,
992
1068
  "create": cmd_create,
993
1069
  "add-context": cmd_add_context,
994
1070
  "validate": cmd_validate,
@@ -1,17 +1,22 @@
1
1
  # Development Workflow
2
2
 
3
+ > **Human overview — not runtime SSOT.** This file is a copy-template reading guide for people. Gates, Rigor, Topology, and Task state are Kernel/`task.json` projections (`required_controls`, Topology, Event Bridge). Do not parse this document as the runtime program of record.
4
+
3
5
  ---
4
6
 
5
7
  ## Core Principles
6
8
 
7
- 1. **Plan before code** — figure out what to do before you start
8
- 2. **Specs injected, not remembered** — guidelines are injected via hook/skill, not recalled from memory
9
- 3. **Persist everything** — research, decisions, and lessons all go to files; conversations get compacted, files don't
10
- 4. **Incremental development** — one task at a time
11
- 5. **Capture learnings** — after each task, review and write new knowledge back to spec
9
+ 1. **Parallel first** — when ≥2 independent units have isolatable write-sets, default to parallel; serial needs a written reason. Attention order is not a serial lock. Convention + review, not a new CLI gate. See Parallel-first below.
10
+ 2. **Plan before code** — figure out what to do before you start
11
+ 3. **Specs injected, not remembered** guidelines are injected via hook/skill, not recalled from memory
12
+ 4. **Persist everything** — research, decisions, and lessons all go to files; conversations get compacted, files don't
13
+ 5. **Incremental development** — finish a slice before expanding; this is not a serial lock on independent units
14
+ 6. **Capture learnings** — after each task, review and write new knowledge back to spec
12
15
 
13
16
  **Session boundary** — Continue → clear → handoff (`cstl-handoff`, when the work needs to travel) → subagent → compact. A task directory's `handoff.md` is integration/delivery evidence, not a session handoff document.
14
17
 
18
+ **Durable objectives** — Cursor official `/goal` (persistent in-session run). Not a Trellis task type, not Parent/Child, not `cstl-handoff`. Do **not** restore `cstl-goal`.
19
+
15
20
  ---
16
21
 
17
22
  ## Trellis System
@@ -108,9 +113,9 @@ python3 ./.cstl/scripts/get_context.py --mode retrieval-pack --json --input <evi
108
113
 
109
114
  **Research-end hook (Cursor `stop`):** when the selected task has `{TASK}/research/*.md` or `research/smart-search/`, `.cursor/hooks/research-end-retrieval-pack.py` may write `{TASK}/research/retrieval-pack-latest.json` via `get_context --mode retrieval-pack`. Default session JSON is unchanged; use the file when closing research or before Phase 3.1.
110
115
 
111
- **Retrieval daily guide:** `.cstl/spec/guides/retrieval-daily-guide.md` — when to use rg, codegraph, fast-context-mcp, smart-search-cli (and Cursor web fallback), artifact/session memory, codebase router (suggest-only), and explicit retrieval-pack scoring.
116
+ **Retrieval daily guide:** `.cstl/framework/retrieval-daily-guide.md` — when to use rg, codegraph, fast-context-mcp, smart-search-cli (and Cursor web fallback), artifact/session memory, codebase router (suggest-only), and explicit retrieval-pack scoring.
112
117
 
113
- **Cursor subagent dispatch:** `.cstl/spec/guides/cursor-subagent-policy.md` — `cstl-research` / `cstl-implement` / `cstl-check`; Parent child default **Task** `cstl-implement` from Parent session (`generate-child-prompt --mode subagent`). **Cursor++ BYOK:** per-type models via `.cstl/local/cursor2plus/` + user/project JSON maps (not committed slugs). **Native Cursor API:** frontmatter `model:` on agents still works. PRD Grill stays in `cstl-brainstorm`, not a subagent. **Cursor++:** compatible v0.0.11+ (SubAgent readonly bug fixed).
118
+ **Cursor subagent dispatch:** `.cstl/framework/cursor-subagent-policy.md` — `cstl-research` / `cstl-implement` / `cstl-check`; Parent child default **Task** `cstl-implement` from Parent session (`generate-child-prompt --mode subagent`). **Native Cursor API:** frontmatter `model:` on agents still works. PRD Grill stays in the planning session (Read `.cstl/framework/prd-grill-frontier.md`), not a subagent. Cursor++ / cstl-byok are **not** Native install surfaces (no command, skill, or init ask).
114
119
 
115
120
  ---
116
121
 
@@ -188,6 +193,65 @@ Classification mark (R2 — visible audit trail). Start your reply with one line
188
193
 
189
194
  Consent gate. After classifying into any mode that creates a task, ask the user for task-creation consent before creating any Trellis artifact. User approval to create a task is **not** approval to start implementation — planning still happens first. If the user declines a task for a simple request, skip Trellis for this session.
190
195
 
196
+ ### Personal Lite path (Open → Close)
197
+
198
+ Personal Lite is the default runnable slice: **main Agent**, Definition / Evidence dual surfaces, **no Parent topology**, **no Git requirement**. Kernel phase names are internal; user-visible `planning` / `in_progress` / `completed` stay unchanged.
199
+
200
+ | Step | Event / surface | Notes |
201
+ | --- | --- | --- |
202
+ | Open | Triage Outcome `No Task` or `Lite` | Event-style; do not require Parent. Full always-on tree stays for Full/Parent. |
203
+ | Define | `prd.md` | Created on `task.py create`; fill Acceptance Criteria before Execute. |
204
+ | Approve | `task.py start-execution --approved` | `--check` is CLI preflight only — it does **not** impersonate human approval. |
205
+ | Execute | Main Agent | Do not force Subagent, worktree, or Parent. |
206
+ | Verify | `verify.md` | Required Evidence. Placeholder / fake-green still fails Close. |
207
+ | Close | `task.py archive` | Writes Outcome. Missing `.git` or `task-map.md` / `children[]` must not fail Lite Close. Physical directory retention is not a completion condition. |
208
+
209
+ Context: `python3 ./.cstl/scripts/get_context.py --mode lite --json` assembles a **budgeted** pack (Definition / Evidence / thin exact-semantic-structural-external router). Unactivated On-demand (Parent / VCS / retrieval-extended) and a full `workflow.md` dump are refused rather than silently stuffed in.
210
+
211
+ Low interaction: no hard-Risk Lite does not add extra mechanical confirmation gates. The Agent retrieves repo facts; the user decides intent, risk acceptance, and the Approve/Close gates above.
212
+
213
+ ### Full Quality path (conditional Design + ledger + graded Check)
214
+
215
+ Full keeps the same user-visible `planning` / `in_progress` / `completed` names. Kernel persists resolved `required_controls`; **do not infer Rigor from whether `design.md` happens to exist**.
216
+
217
+ | Role | Default surface | Required? |
218
+ | --- | --- | --- |
219
+ | Definition | `prd.md` | Yes |
220
+ | Execution Contract | `implement.md` (strategy contract) | Yes |
221
+ | Verification Plan | `implement.md` | Yes |
222
+ | Evidence | `verify.md` (human projection) | Yes |
223
+ | Independent Check | `self-review` or `true-independent` verdict | Yes for Full; **not** for Lite |
224
+ | Design | `design.md` | Only when Risk/Policy or `verification_profile: architecture` requires it |
225
+
226
+ - `verification_profile` expands to gates; Kernel stores the final `required_controls`.
227
+ - AC → Evidence Ledger is machine-readable (`ac_evidence_ledger` on `task.json`); `verify.md` is the human projection. Missing mapping, placeholder evidence, or a stale fingerprint after definition/code change blocks Close.
228
+ - Independent Check is **read-only**. Repair returns to Execute. Platform without a reliable independent worker must label `self-review` and must not claim independent. `true-independent` without a worker **blocks**.
229
+ - Lite Open→Close is unchanged and does not gain Independent Check from this path.
230
+
231
+ ### On-demand and Topology (Stage 5)
232
+
233
+ Rigor (`lite` / `full`) and Topology (`single` / `parent-child`) are orthogonal. Parent is an orchestration topology, not a higher quality grade. Kernel extras (`topology`, `dependency_graph`, `ondemand_modules`) are the graph authority; `task-map.md` and the dashboard are projections. Prefer Cursor native parallel (P18); Trellis does not schedule workers.
234
+
235
+ - Single-parent tree: a Task has at most one Parent. A second Parent is rejected.
236
+ - Decompose only proposes slices. Child directories are not created until the user confirms.
237
+ - Capture Candidate writes a pool candidate. It does not create a Task.
238
+ - Typed edges: `requires` blocks readiness; `advisory` does not. Existing `depends_on` expands to `requires`.
239
+ - Integration authority stays with the Parent. A Child must not `integrate-child`.
240
+ - On-demand modules (Parent-Child, VCS, Memory, Retention, …) are registered and dormant. First legal trigger activates them and is auditable. Lite Single does not force Parent / VCS / Memory / Retention into the resident pack.
241
+ - `integration-handoff` is owned by Parent-Child. `session-transfer` is a separate owner.
242
+ - Missing lifecycle slots still block start. Missing Profile-required On-demand is `degraded`, not fake-green. Physical Retention does not change Close Outcome.
243
+ - User-visible `planning` / `in_progress` / `completed` names stay unchanged.
244
+
245
+ ### Adapter and Middleware (Stage 6)
246
+
247
+ Cursor Adapter stays thin: a generic Event Bridge, one Bootstrap rule, and a short AGENTS pointer. Modules subscribe to standard hook events; an unsubscribed module must not fail the hook. Baseline capability routing is only `exact` / `semantic` / `structural` / `external`.
248
+
249
+ - smart-search is an independent `external-knowledge` Middleware Provider. CSTL holds capability, readiness, compatibility range, and evidence pointers — not the Provider implementation.
250
+ - Missing or failed Provider marks Profile `degraded`. Tasks that do not need external knowledge may Open→Close. Tasks that require it block, or degrade when Policy says so. Platform native Web is a downgrade, not an equivalent.
251
+ - codegraph and fast-context are Optional. They are not default always-on and are not forced into the install surface.
252
+ - Native SSOT has no Cursor++ / cstl-byok live entry. Environment probe fields may remain.
253
+ - Do not rewrite smart-search or codegraph here. Do not invent a Trellis scheduler.
254
+
191
255
  Selected-task continuity. When a `selected_task` already exists, do not rerun global classification on every follow-up; continue inside the selected task unless a strong conflict exists (explicit exit/switch/create language, out-of-scope request, different artifact/archive target, new independent deliverable, contract-changing request, or evidence pollution risk).
192
256
 
193
257
  Review-pool boundary. In-session requests that are clear and directly actionable go straight to Lite / Full / Parent task creation and do **not** enter the pool (`.cstl/pool/`). Ideas, directions, gaps, or unformed thoughts go into the pool. Only `accepted` pool entries may be turned into tasks via `task.py create`. The pool is a candidate queue; a Task is a commitment. See `.cstl/pool/README.md` for the full state machine and role split. Pool entry ↔ task links and pool/plan validation are maintained via the pool CLI: `python3 ./.cstl/scripts/pool.py --help` (link/unlink/validate/plan-check/show). Choosing the next item: treat `plan.md` closed/mainline sections as authoritative → item status → `task.py list` → ask the user; landed items/mechanisms must leave fog (discipline in `.cstl/pool/README.md` 「下一项怎么选 + fog 卫生」).
@@ -201,7 +265,7 @@ Classify by risk and persistence, not raw effort size. A short change to durable
201
265
  | No Task | Conversation, status, explanation, read-only lookup, or a tiny one-turn action with no durable project change. | explain / status / lookup / read-only / one-liner | None. No archive unless upgraded. |
202
266
  | Micro-Grill | The user needs focused clarification, decision pressure, or a small requirement interrogation before deciding whether work exists. | small + underspecified / "depends" / needs clarification / decision tree first | Usually none. Upgrade before durable edits, validation, gates, or archive evidence. |
203
267
  | Lite Task | Low-risk durable work with narrow scope, local validation, and no shared contract change. | low-risk / single file / local validation / no contract / narrow scope | `task.json`, `prd.md`, `verify.md`, and archive evidence. |
204
- | Full Task | Durable code, template, runtime, workflow, or cross-file behavior where design, execution strategy, validation, or reviewer gates matter. | cross-file / framework semantics / contract change / template / runtime / workflow / multi-file behavior | `prd.md`, `design.md`, `implement.md`, `verify.md`, Development Strategy Contract, `verification_profile`, `quality_gates`, and archive evidence. |
268
+ | Full Task | Durable code, template, runtime, workflow, or cross-file behavior where design, execution strategy, validation, or reviewer gates matter. | cross-file / framework semantics / contract change / template / runtime / workflow / multi-file behavior | `prd.md`, `implement.md`, `verify.md`, Execution/Verification contract, `required_controls`, AC ledger, Independent Check; `design.md` only when Risk/Policy requires it |
205
269
  | Parent Task / Child Tasks | One request contains independent deliverables, staged execution, parallel execution, or final integration authority that must be owned by a Parent. | multiple independent deliverables / staged / parallel / integration authority | Parent `task-map.md`, Child task artifacts, Child handoff evidence, Parent final integration evidence. |
206
270
 
207
271
  Default Trellis framework semantics, task model, platform adapters, MCP/capability setup, runtime integration, retrieval/graph tooling, Parent/Child orchestration, and quality-gate work to Full Task or higher.
@@ -226,13 +290,13 @@ Before executing an upgrade that creates artifacts, changes task mode, adds gate
226
290
  | No selected task + small unclear ask | `cstl-micro-grill` |
227
291
  | No selected task + need dashboard | `cstl-start` |
228
292
  | Selected task + resume step | `cstl-continue` |
229
- | Planning / PRD | `cstl-brainstorm` |
230
- | Parent with parallel children | `generate-child-prompt --mode subagent`; writable Agent; see `.cstl/spec/guides/cursor-subagent-policy.md` |
293
+ | Planning / PRD | Read `.cstl/framework/prd-grill-frontier.md` (PRD Grill discipline; full body in the bundled brainstorm skill) |
294
+ | Parent with parallel children | Prefer Multitask / `Task` parallel (serial needs `serial_reason`); `generate-child-prompt --mode subagent`; see `cursor-native-modes-guide.md` |
231
295
 
232
296
  ### Cursor native modes (Prefer — don't replace)
233
297
 
234
- Full map: `.cstl/spec/guides/cursor-native-modes-guide.md` · per-turn slim rule: `.cursor/rules/cstl-cursor-modes.mdc`.
235
- Task-driven: try callable native first (`SwitchMode` plan/agent, Multitask/`Task` when useful); **quiet cstl spine fallback** when not — no user-facing “不适配 mode” list.
298
+ Full map: `.cstl/framework/cursor-native-modes-guide.md` · per-turn slim rule: `.cursor/rules/cstl-cursor-modes.mdc`.
299
+ Task-driven: try callable native first (`SwitchMode` plan/agent; Multitask/`Task` **by default** when ≥2 independent units); **quiet cstl spine fallback** when not — no user-facing “不适配 mode” list.
236
300
 
237
301
  | Situation | Prefer Cursor mode | Trellis phase / note |
238
302
  | --- | --- | --- |
@@ -240,7 +304,7 @@ Task-driven: try callable native first (`SwitchMode` plan/agent, Multitask/`Task
240
304
  | Scope / design before code | **Plan** (`SwitchMode(plan)` when useful) | Phase 1; artifacts → `prd.md` / `design.md` / `implement.md` |
241
305
  | Approved build / verify | **Agent** | Phase 2–3; `execution_mode` contract |
242
306
  | Repeat failure / runtime debug | **Debug** when reachable | Evidence → `verify.md`; loops → `cstl-break-loop` |
243
- | Independent Parent children (post-approval) | **Multitask** / Build in Parallel when useful | Explicit task path per worker; Parent integrates |
307
+ | Independent Parent children (post-approval) | **Multitask** / Build in Parallel **by default** when ≥2 independent units | Explicit task path per worker; serial needs `serial_reason`; Parent integrates |
244
308
 
245
309
  Details: archived `06-15-child-phase3-task-ladder` → `research/task-ladder-iteration.md`.
246
310
 
@@ -248,10 +312,10 @@ Details: archived `06-15-child-phase3-task-ladder` → `research/task-ladder-ite
248
312
 
249
313
  - `prd.md` — requirements, constraints, and acceptance criteria. Do not put technical design or execution checklists here.
250
314
  - `design.md` — technical design for complex tasks: boundaries, contracts, data flow, tradeoffs, compatibility, rollout / rollback shape.
251
- - `implement.md` — execution plan for complex tasks: ordered checklist, Development Strategy Contract, validation commands, review gates, and rollback points.
315
+ - `implement.md` — execution plan for complex tasks: ordered checklist, Development Strategy Contract, validation commands, review gates, and rollback points. Parent / Full Task fan-out also declare parallel-first fields (可并行组 / 合并点 / 冲突面 / `serial_reason`) — see Parallel-first above and `.cstl/framework/parallel-first-execution.md`.
252
316
  - `implement.jsonl` / `check.jsonl` — spec and research manifests for sub-agent context. They do not replace `implement.md`.
253
- - `verification_profile` / `quality_gates` — gate policy belongs in task artifacts and `task.json`; `task.json.quality_gate_results` is compact machine-checkable state, not human review prose.
254
- - Lightweight tasks may be PRD-only. Complex tasks must have `prd.md`, `design.md`, and `implement.md` before `task.py start-execution --check`.
317
+ - `verification_profile` / `quality_gates` — gate policy belongs in task artifacts and `task.json`; Kernel persists resolved `required_controls`. `task.json.quality_gate_results` is compact machine-checkable state, not human review prose. `ac_evidence_ledger` is the machine AC → Evidence map; `verify.md` is the human projection.
318
+ - Lightweight tasks may be PRD-only. Full tasks need Definition + Execution/Verification contract (`implement.md` default) before `task.py start-execution --check`. Design is required only when Risk/Policy or `verification_profile: architecture` says so — do not treat a leftover `design.md` as Full.
255
319
  - `start-execution` planning gates (`requirements-review`, `architecture-review` when enabled) auto-record on `--approved` when artifacts pass CLI checks; use `record-gate` only as a manual override.
256
320
 
257
321
  ### Parent / Child Task Trees
@@ -260,6 +324,24 @@ Use a parent task when one user request contains several independently verifiabl
260
324
 
261
325
  Use child tasks for deliverables that can be planned, implemented, checked, and archived independently. Ordering between deliverables is an explicit declaration, not an implicit system: child-level ordering lives in the Parent `task-map.md` `children[].depends_on`, and task-level ordering in task.json `depends_on` (`task.py set-deps <task> <dep...>`). By default these declarations are soft hints only — the dashboard and `start-execution --check` show unmet / dangling / cyclic dependencies as warnings and do not block a transition (a task may opt into hard gates with `depends_mode: block`, see Task dependencies below); `depends_on` declares ordering, it does not schedule work. Keep each child's acceptance criteria testable on its own, and keep the Parent as the integration authority.
262
326
 
327
+ ### Parallel-first execution
328
+
329
+ This is a **product** principle, not only an execution contract. It applies to the review pool, development-plan batches, Parent/Full fan-out, and independent middleware / protocol / release tracks. Planning declares parallel structure; **Cursor native** runs it. Trellis does **not** ship a parallel scheduler or a Multitask replacement. Field map: `.cstl/framework/parallel-first-execution.md`.
330
+
331
+ **Does not apply:** Lite / single-file work; write-sets that cannot isolate; HITL / `start-execution --approved` / reviewer / `integrate-child`.
332
+
333
+ **Does not replace** the existing `serial_reason` list. v1 strength is convention + review call-out, **not** a CLI hard gate.
334
+
335
+ | Layer | Duty |
336
+ | --- | --- |
337
+ | **Prefer** | Cursor Multitask / Build in Parallel / Agent `Task` parallel / native worktree. If it can run native, run native. |
338
+ | **Adapt** | Parent still owns `integrate-child`. HITL, `start-execution --approved`, and reviewer gates stay **serial**. Every worker prompt includes explicit `.cstl/tasks/<dir>` — never rely on `selected_task`. |
339
+ | **Own** | Contract only: default parallel; serial must write `serial_reason`; task-map / `implement.md` declare 可并行组 / 合并点 / 冲突面. No queue, no new CLI. |
340
+
341
+ **Default parallel when** planning already has ≥2 independent units: Parent children with empty `depends_on`, or a Full task with explicit Task fan-out. Lite / single-file work is **not** forced into parallel agents.
342
+
343
+ **Serial is an exception.** Write `serial_reason` as one of: shared write-set / HITL or reviewer gate / `depends_on` unmet / user asked serial / conflict surface cannot isolate.
344
+
263
345
  ### Task dependencies (Plan A / Plan B)
264
346
 
265
347
  **任务依赖(Plan A / Plan B)**:顺序须显式声明;默认(`warn`)仅 dashboard / `start-execution --check` 软提示(WARN),不挡门禁;可 opt-in `block` 在 mutation 点硬挡(见下);不是调度器,也不替代 Parent 集成权威。
@@ -335,7 +417,7 @@ Framework refresh with no selected task: load `cstl-start` once; after the user
335
417
  <!-- Per-turn breadcrumb: shown throughout Phase 1 (status='planning') -->
336
418
 
337
419
  [workflow-state:planning]
338
- Load `cstl-brainstorm`; stay in planning.
420
+ Read `.cstl/framework/prd-grill-frontier.md` for PRD Grill discipline; stay in planning.
339
421
  Lightweight: `prd.md` can be enough. Complex: finish `prd.md`, `design.md`, and `implement.md`; run `task.py start-execution <task> --check`, report PASS with task plus current contract/fingerprint context, and ask for explicit execution approval before `--approved`.
340
422
  Multi-deliverable scope: consider a parent task plus independently verifiable child tasks; dependencies must be written in child artifacts, not implied by tree position.
341
423
  Sub-agent mode: curate `implement.jsonl` and `check.jsonl` as spec/research manifests before start.
@@ -397,11 +479,12 @@ Code committed. Run `/cstl:finish-work`; if dirty, return to Phase 3.4 first.
397
479
  When a user request matches one of these intents inside a selected task, route first, then load the detailed phase step if needed.
398
480
 
399
481
 
400
- - Planning or unclear requirements -> **Prefer Plan** when designing scope; load `cstl-brainstorm` for PRD grill (see `cursor-native-modes-guide.md`).
482
+ - Planning or unclear requirements -> **Prefer Plan** when designing scope; read `.cstl/framework/prd-grill-frontier.md` for PRD grill discipline (see `.cstl/framework/cursor-native-modes-guide.md`).
483
+ - Creating or making a **behavioral/structural** change to a Trellis bundled, `blaze-skills`, or harness skill → **must** Read `cstl-skill-creator` (`SKILL.md` + `references/review-checklist.md`) and follow its workflow before editing `SKILL.md`. **Skip** for typo / pure link fixes. Internal skill, not a user slash command. **Does not apply** to Cursor product skills (e.g. `~/.cursor/skills-cursor/create-skill`). Paths: `.cstl/framework/internal-skills-cursor-reachability.md`.
401
484
  - Read-only questions with no durable change -> **Prefer Ask**; classify No Task; do not create artifacts without consent.
402
485
  - `in_progress` implementation/check -> **Agent** default; if contract `execution_mode: worker`, dispatch `cstl-implement` / `cstl-check`; if `inline`, main session; if `child-task`, Child/Parent orchestration.
403
486
  - Repeated debugging / runtime evidence -> **Prefer Debug**; load `cstl-break-loop` when the same issue recurred; persist evidence in `verify.md`.
404
- - Parent parallel independent children (after execution approval) -> **Multitask** / Build in Parallel with explicit `.cstl/tasks/<dir>` in each worker prompt; Parent retains integration authority.
487
+ - Parent parallel independent children (after execution approval) -> **Multitask** / Build in Parallel **by default** (empty `depends_on`); each worker prompt has explicit `.cstl/tasks/<dir>`; serial needs `serial_reason`; Parent retains integration authority. HITL / gates / `integrate-child` stay serial.
405
488
  - Spec updates after learning decision -> `cstl-update-spec`.
406
489
 
407
490
 
@@ -464,9 +547,9 @@ Skip when the user has already explicitly selected an appropriate task with `pyt
464
547
 
465
548
  #### 1.1 Requirement exploration `[required · repeatable]`
466
549
 
467
- Load the `cstl-brainstorm` skill and explore requirements interactively with the user per the skill's guidance.
550
+ Read `.cstl/framework/prd-grill-frontier.md` (PRD Grill discipline; full body in the bundled `brainstorm` skill) and explore requirements interactively with the user.
468
551
 
469
- The brainstorm skill will guide you to:
552
+ The PRD Grill discipline will guide you to:
470
553
  - Ask one question at a time
471
554
  - Prefer researching over asking the user
472
555
  - Prefer offering options over open-ended questions
@@ -642,6 +725,8 @@ Read `execution_mode` from the approved Development Strategy Contract in `implem
642
725
  | `worker` | Spawn **`cstl-implement`** (Cursor): after `start-execution --approved`, assemble dispatch prompt via CLI Layer 2, then `Task(subagent_type=cstl-implement, prompt=<assembled>)`. Do **not** rely on preToolUse hook alone — see `cursor-context-injection-guide.md`. Tell the spawned agent it is already `cstl-implement` and must not spawn another `cstl-implement` / `cstl-check`. |
643
726
  | `child-task` | Child worker session (or Parent `generate-child-prompt`); isolation per contract (`git-worktree` → `prepare-child-worktree` when applicable). |
644
727
 
728
+ Independent Parent children (post-approval, empty `depends_on`): Prefer native parallel (Multitask / Build in Parallel / `Task` / worktree). Do **not** invent a Trellis scheduler. HITL, `start-execution --approved`, reviewer gates, and `integrate-child` stay serial (`merge_limit: 1`). Serial work requires `serial_reason` in the task-map / `implement.md` declaration. See Parallel-first above.
729
+
645
730
  Context for worker dispatch includes `implement.jsonl` references, `prd.md`, `design.md` if present, and `implement.md` if present.
646
731
 
647
732
  #### 2.2 Quality check `[required · repeatable]`
@@ -658,6 +743,7 @@ The check agent's job:
658
743
  - Fix implementation defects only when they stay inside the approved contract
659
744
  - Route requirement, design, contract, scope, gate, capability, runtime, Parent `contract_epoch`, or Child boundary defects to Return-to-Planning
660
745
  - Run lint and typecheck to verify
746
+ - For **new or structurally changed** Trellis / blaze-skills / harness skills: `verify.md` should record that `cstl-skill-creator` workflow + review-checklist was followed (always-on convention, not a CLI gate). Typo / link-only and Cursor product skills are out of scope.
661
747
 
662
748
 
663
749
 
@@ -683,9 +769,9 @@ Use `contextPack.selected` / `scoredEvidence` to order citations in `verify.md`.
683
769
 
684
770
  #### 3.1 Quality verification `[required · repeatable]`
685
771
 
686
- **Verification strength:** match closeout depth to task risk per `.cstl/spec/guides/verification-strength-guide.md` (Lite / Full / Parent × `verification_profile`; not TDD). Use `verify_evidence_probe.py` fixtures when validating gate behavior.
772
+ **Verification strength:** match closeout depth to task risk per `.cstl/framework/verification-strength-guide.md` (Lite / Full / Parent × `verification_profile`; not TDD). Use `verify_evidence_probe.py` fixtures when validating gate behavior.
687
773
 
688
- **Injection budget:** curate jsonl manifests and alwaysApply rules per `.cstl/spec/guides/injection-budget-guide.md`; probe with `injection_budget_probe.py` before adding per-turn policy.
774
+ **Injection budget:** curate jsonl manifests and alwaysApply rules per `.cstl/framework/injection-budget-guide.md`; probe with `injection_budget_probe.py` before adding per-turn policy.
689
775
 
690
776
  Verification / Review is evidence and judgment, not a hidden implementation loop. Load the `cstl-check` skill or agent and do a final review:
691
777
  - Spec compliance
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Detect Cursor Native vs Cursor++ BYOK for retrieval routing.
2
+ * Detect Cursor Native vs BYOK environment for retrieval routing.
3
+ * This is an environment probe, not a product install surface.
3
4
  * Mirrors templates/trellis/scripts/common/cursor_retrieval_env.py
4
5
  */
5
6
  export declare const ENV_NATIVE: "native";
@@ -1 +1 @@
1
- {"version":3,"file":"cursor-retrieval-env.d.ts","sourceRoot":"","sources":["../../src/utils/cursor-retrieval-env.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,eAAO,MAAM,UAAU,EAAG,QAAiB,CAAC;AAC5C,eAAO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C,MAAM,MAAM,kBAAkB,GAC1B,OAAO,UAAU,GACjB,OAAO,QAAQ,GACf,OAAO,WAAW,CAAC;AAEvB,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,kBAAkB,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,WAAW,IAAI,MAAM,CAMpC;AAED,wBAAgB,4BAA4B,IAAI,sBAAsB,CA8CrE;AAED,wBAAgB,wBAAwB,IAAI,kBAAkB,CAU7D;AAED,wBAAgB,MAAM,CAAC,GAAG,CAAC,EAAE,kBAAkB,GAAG,IAAI,GAAG,OAAO,CAE/D;AAED,8FAA8F;AAC9F,wBAAgB,kBAAkB,CAAC,GAAG,CAAC,EAAE,kBAAkB,GAAG,IAAI,GAAG,OAAO,CAG3E;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,kBAAkB,GAAG,gBAAgB,CAAC;CACxD;AAED,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,kBAAkB,GAC5B,iBAAiB,CAqBnB"}
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Detect Cursor Native vs Cursor++ BYOK for retrieval routing.
2
+ * Detect Cursor Native vs BYOK environment for retrieval routing.
3
+ * This is an environment probe, not a product install surface.
3
4
  * Mirrors templates/trellis/scripts/common/cursor_retrieval_env.py
4
5
  */
5
6
  import fs from "node:fs";
@@ -82,7 +83,7 @@ export function semanticRouteSpec(cursorEnv) {
82
83
  : "";
83
84
  return {
84
85
  commands: ["fast_context_search (fast-context MCP)"],
85
- rationaleSuffix: " Cursor++ BYOK: built-in semantic unavailable; fast-context MCP primary." +
86
+ rationaleSuffix: " BYOK env probe: built-in semantic unavailable; Optional fast-context only if selected." +
86
87
  unknownCaveat,
87
88
  platformNative: false,
88
89
  semanticBackend: "fast-context-mcp",
@@ -1 +1 @@
1
- {"version":3,"file":"cursor-retrieval-env.js","sourceRoot":"","sources":["../../src/utils/cursor-retrieval-env.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,MAAM,UAAU,GAAG,QAAiB,CAAC;AAC5C,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAe,CAAC;AACxC,MAAM,CAAC,MAAM,WAAW,GAAG,SAAkB,CAAC;AAgB9C,MAAM,UAAU,WAAW;IACzB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,EAAE,CAAC;IACrD,IAAI,GAAG,EAAE,CAAC;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,UAAU,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,4BAA4B;IAC1C,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,EAAE,CAAC;IAC5D,IAAI,WAAW,KAAK,GAAG,EAAE,CAAC;QACxB,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IAChE,CAAC;IACD,IAAI,WAAW,KAAK,GAAG,EAAE,CAAC;QACxB,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MA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ACvB,IAAI,CAAC,GAAG,KAAK,QAAQ;QACrB,IAAI,CAAC,GAAG,KAAK,WAAW,EACxB,CAAC;QACD,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,GAA+B;IACpD,OAAO,CAAC,GAAG,IAAI,wBAAwB,EAAE,CAAC,KAAK,QAAQ,CAAC;AAC1D,CAAC;AAED,8FAA8F;AAC9F,MAAM,UAAU,kBAAkB,CAAC,GAA+B;IAChE,MAAM,QAAQ,GAAG,GAAG,IAAI,wBAAwB,EAAE,CAAC;IACnD,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,WAAW,CAAC;AAC3D,CAAC;AASD,MAAM,UAAU,iBAAiB,CAC/B,SAA6B;IAE7B,IAAI,kBAAkB,CAAC,SAAS,CAAC,EAAE,CAAC;QAClC,MAAM,aAAa,GACjB,SAAS,KAAK,WAAW;YACvB,CAAC,CAAC,uEAAuE;YACzE,CAAC,CAAC,EAAE,CAAC;QACT,OAAO;YACL,QAAQ,EAAE,CAAC,wCAAwC,CAAC;YACpD,eAAe,EACb,yFAAyF;gBACzF,aAAa;YACf,cAAc,EAAE,KAAK;YACrB,eAAe,EAAE,kBAAkB;SACpC,CAAC;IACJ,CAAC;IACD,OAAO;QACL,QAAQ,EAAE,CAAC,8CAA8C,CAAC;QAC1D,eAAe,EAAE,mCAAmC;QACpD,cAAc,EAAE,IAAI;QACpB,eAAe,EAAE,gBAAgB;KAClC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Hash-safe cleanup of retired Cursor++ managed residue.
3
+ *
4
+ * Cursor++ product surfaces are no longer shipped. On `cstl update`, delete
5
+ * known managed paths only when on-disk content matches a pristine template
6
+ * hash captured from the last shipped SSOT bytes. User-modified files are
7
+ * preserved with a warning.
8
+ *
9
+ * Never target `.cstl/middleware/` (user overlay). Residue paths are an
10
+ * explicit allow-list; overlay isolation is a separate contract.
11
+ */
12
+ /** Relative path under the workflow dir (`.cstl` or `.trellis`) or absolute-from-cwd. */
13
+ export interface Cursor2plusResidueTarget {
14
+ /** Posix-style path relative to project cwd (uses `{workflow}` placeholder). */
15
+ pathTemplate: string;
16
+ allowedHashes: readonly string[];
17
+ }
18
+ /**
19
+ * Pristine hashes computed from packages/cli/src/templates before P23 deletion
20
+ * (LF-normalized SHA-256, same as computeHash).
21
+ */
22
+ export declare const CURSOR2PLUS_RESIDUE_TARGETS: readonly Cursor2plusResidueTarget[];
23
+ export interface Cursor2plusResidueCleanupResult {
24
+ deleted: string[];
25
+ preservedModified: string[];
26
+ missing: string[];
27
+ }
28
+ /**
29
+ * Delete pristine Cursor++ residue under cwd. Never deletes user-modified files.
30
+ */
31
+ export declare function cleanupCursor2plusResidue(cwd: string, options?: {
32
+ dryRun?: boolean;
33
+ }): Cursor2plusResidueCleanupResult;
34
+ /**
35
+ * True when any Cursor++ local bundle directory still exists (residue notice).
36
+ */
37
+ export declare function hasCursor2plusBundleResidue(cwd: string): boolean;
38
+ //# sourceMappingURL=cursor2plus-residue-cleanup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor2plus-residue-cleanup.d.ts","sourceRoot":"","sources":["../../src/utils/cursor2plus-residue-cleanup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,yFAAyF;AACzF,MAAM,WAAW,wBAAwB;IACvC,gFAAgF;IAChF,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,SAAS,wBAAwB,EA6D1E,CAAC;AAEF,MAAM,WAAW,+BAA+B;IAC9C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAwBD;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC,+BAA+B,CA8BjC;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAQhE"}