@blxzer/cursor-trellis 0.2.9 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/README.md +85 -19
  3. package/README.zh-CN.md +60 -21
  4. package/bin/smart-search.js +1 -1
  5. package/dist/cli/index.d.ts.map +1 -1
  6. package/dist/cli/index.js +46 -18
  7. package/dist/cli/index.js.map +1 -1
  8. package/dist/commands/capability-smoke.d.ts +24 -0
  9. package/dist/commands/capability-smoke.d.ts.map +1 -0
  10. package/dist/commands/capability-smoke.js +83 -0
  11. package/dist/commands/capability-smoke.js.map +1 -0
  12. package/dist/commands/channel/agent-loader.d.ts +1 -1
  13. package/dist/commands/channel/agent-loader.js +4 -4
  14. package/dist/commands/channel/agent-loader.js.map +1 -1
  15. package/dist/commands/channel/guard.d.ts +2 -2
  16. package/dist/commands/channel/guard.js +3 -3
  17. package/dist/commands/channel/guard.js.map +1 -1
  18. package/dist/commands/channel/index.js +3 -3
  19. package/dist/commands/channel/index.js.map +1 -1
  20. package/dist/commands/channel/list.d.ts +1 -1
  21. package/dist/commands/channel/list.js +1 -1
  22. package/dist/commands/channel/rm.d.ts +1 -1
  23. package/dist/commands/channel/rm.js +1 -1
  24. package/dist/commands/channel/store/lock.d.ts +1 -1
  25. package/dist/commands/channel/store/lock.js +1 -1
  26. package/dist/commands/channel/store/paths.js +1 -1
  27. package/dist/commands/channel/store/paths.js.map +1 -1
  28. package/dist/commands/init.d.ts.map +1 -1
  29. package/dist/commands/init.js +197 -91
  30. package/dist/commands/init.js.map +1 -1
  31. package/dist/commands/uninstall.d.ts +4 -4
  32. package/dist/commands/uninstall.js +12 -12
  33. package/dist/commands/uninstall.js.map +1 -1
  34. package/dist/commands/update.d.ts +7 -2
  35. package/dist/commands/update.d.ts.map +1 -1
  36. package/dist/commands/update.js +161 -61
  37. package/dist/commands/update.js.map +1 -1
  38. package/dist/commands/upgrade.js +2 -2
  39. package/dist/commands/upgrade.js.map +1 -1
  40. package/dist/commands/workflow.d.ts +4 -4
  41. package/dist/commands/workflow.d.ts.map +1 -1
  42. package/dist/commands/workflow.js +10 -9
  43. package/dist/commands/workflow.js.map +1 -1
  44. package/dist/configurators/cursor.d.ts +2 -2
  45. package/dist/configurators/cursor.js +4 -4
  46. package/dist/configurators/cursor.js.map +1 -1
  47. package/dist/configurators/index.d.ts.map +1 -1
  48. package/dist/configurators/index.js +4 -4
  49. package/dist/configurators/index.js.map +1 -1
  50. package/dist/configurators/shared.d.ts +10 -10
  51. package/dist/configurators/shared.d.ts.map +1 -1
  52. package/dist/configurators/shared.js +32 -32
  53. package/dist/configurators/shared.js.map +1 -1
  54. package/dist/configurators/workflow.d.ts +6 -6
  55. package/dist/configurators/workflow.js +1 -1
  56. package/dist/constants/paths.d.ts +24 -24
  57. package/dist/constants/paths.d.ts.map +1 -1
  58. package/dist/constants/paths.js +16 -16
  59. package/dist/constants/paths.js.map +1 -1
  60. package/dist/migrations/manifests/0.2.10.json +374 -0
  61. package/dist/migrations/manifests/0.3.0.json +89 -0
  62. package/dist/migrations/manifests/0.3.1.json +32 -0
  63. package/dist/templates/common/bundled-skills/{trellis-cursor2plus-setup → cstl-cursor2plus-setup}/SKILL.md +15 -14
  64. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/SKILL.md +75 -75
  65. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/add-project-local-conventions.md +19 -19
  66. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-agents.md +8 -8
  67. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-context-loading.md +26 -26
  68. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-hooks.md +9 -9
  69. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-skills-or-commands.md +8 -8
  70. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-spec-structure.md +17 -17
  71. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-task-lifecycle.md +46 -46
  72. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-workflow.md +18 -18
  73. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/overview.md +55 -55
  74. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/context-injection.md +20 -20
  75. package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/generated-files.md +83 -0
  76. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/overview.md +15 -15
  77. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/spec-system.md +12 -12
  78. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/task-system.md +34 -34
  79. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/workflow.md +8 -8
  80. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/workspace-memory.md +19 -19
  81. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/agents.md +12 -12
  82. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/hooks-and-settings.md +7 -7
  83. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/overview.md +9 -9
  84. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/platform-map.md +7 -7
  85. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/skills-and-commands.md +19 -19
  86. package/dist/templates/common/bundled-skills/{trellis-micro-grill → cstl-micro-grill}/SKILL.md +62 -47
  87. package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/SKILL.md +44 -44
  88. package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/references/authoring-rules.md +97 -97
  89. package/dist/templates/common/bundled-skills/{trellis-skill-creator/references/trellis-skill-locations.md → cstl-skill-creator/references/cstl-skill-locations.md} +52 -52
  90. package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/references/review-checklist.md +47 -47
  91. package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/SKILL.md +6 -6
  92. package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/repository-analysis.md +1 -1
  93. package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/spec-task-planning.md +3 -3
  94. package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/spec-writing.md +1 -1
  95. package/dist/templates/common/commands/continue.md +24 -24
  96. package/dist/templates/common/commands/finish-work.md +5 -5
  97. package/dist/templates/common/commands/start.md +20 -20
  98. package/dist/templates/common/index.d.ts +1 -1
  99. package/dist/templates/common/index.d.ts.map +1 -1
  100. package/dist/templates/common/skills/before-dev.md +4 -4
  101. package/dist/templates/common/skills/brainstorm.md +188 -164
  102. package/dist/templates/common/skills/break-loop.md +3 -3
  103. package/dist/templates/common/skills/check.md +5 -5
  104. package/dist/templates/common/skills/update-spec.md +4 -4
  105. package/dist/templates/cursor/agents/{trellis-check.md → cstl-check.md} +14 -14
  106. package/dist/templates/cursor/agents/{trellis-implement.md → cstl-implement.md} +14 -14
  107. package/dist/templates/cursor/agents/{trellis-research.md → cstl-research.md} +11 -11
  108. package/dist/templates/cursor/commands/cursor2plus-setup.md +15 -15
  109. package/dist/templates/cursor/fixtures/expected-rules.d.ts +1 -1
  110. package/dist/templates/cursor/fixtures/expected-rules.d.ts.map +1 -1
  111. package/dist/templates/cursor/fixtures/expected-rules.js +2 -2
  112. package/dist/templates/cursor/fixtures/expected-rules.js.map +1 -1
  113. package/dist/templates/cursor/rules/{trellis-subagent-dispatch.mdc → cstl-subagent-dispatch.mdc} +4 -4
  114. package/dist/templates/cursor/rules/{trellis-triage.mdc → cstl-triage.mdc} +3 -3
  115. package/dist/templates/cursor/rules/retrieval-routing.mdc +4 -4
  116. package/dist/templates/extract.d.ts +1 -1
  117. package/dist/templates/extract.js +1 -1
  118. package/dist/templates/markdown/agents.md +13 -13
  119. package/dist/templates/markdown/prompts/run-semantic-slice-12.md.txt +1 -1
  120. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +634 -634
  121. package/dist/templates/markdown/spec/guides/cursor-context-injection-guide.md.txt +5 -5
  122. package/dist/templates/markdown/spec/guides/cursor-semantic-compliance.md.txt +7 -1
  123. package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +393 -391
  124. package/dist/templates/markdown/spec/guides/durable-learning-decision-guide.md.txt +14 -14
  125. package/dist/templates/markdown/spec/guides/execution-strategy.md.txt +5 -5
  126. package/dist/templates/markdown/spec/guides/index.md.txt +3 -2
  127. package/dist/templates/markdown/spec/guides/retrieval-daily-guide.md.txt +10 -10
  128. package/dist/templates/markdown/workspace-index.md +3 -3
  129. package/dist/templates/markdown/worktree.yaml.txt +1 -1
  130. package/dist/templates/shared-hooks/index.d.ts +2 -2
  131. package/dist/templates/shared-hooks/index.js +2 -2
  132. package/dist/templates/shared-hooks/inject-retrieval-plan.py +3 -3
  133. package/dist/templates/shared-hooks/inject-shell-session-context.py +7 -7
  134. package/dist/templates/shared-hooks/inject-subagent-context.py +4 -4
  135. package/dist/templates/shared-hooks/inject-workflow-state.py +37 -37
  136. package/dist/templates/shared-hooks/research-end-retrieval-pack.py +2 -2
  137. package/dist/templates/shared-hooks/session-start.py +16 -16
  138. package/dist/templates/trellis/config/execution-strategy-rules.json +1 -1
  139. package/dist/templates/trellis/config.yaml +5 -25
  140. package/dist/templates/trellis/index.d.ts +2 -2
  141. package/dist/templates/trellis/index.js +2 -2
  142. package/dist/templates/trellis/local/README.md +15 -13
  143. package/dist/templates/trellis/local/patch_wpelc8.py +7 -7
  144. package/dist/templates/trellis/local/subagent-models.json.example +1 -1
  145. package/dist/templates/trellis/local/trellis-task-models.json.example +3 -3
  146. package/dist/templates/trellis/local/trellis-task-models.json5.example +5 -5
  147. package/dist/templates/trellis/local/trellis_task_models_config.py +6 -6
  148. package/dist/templates/trellis/scripts/add_session.py +20 -20
  149. package/dist/templates/trellis/scripts/common/active_task.py +2 -2
  150. package/dist/templates/trellis/scripts/common/artifact_search.py +587 -587
  151. package/dist/templates/trellis/scripts/common/cli_adapter.py +3 -3
  152. package/dist/templates/trellis/scripts/common/codebase_retrieval_router.py +6 -6
  153. package/dist/templates/trellis/scripts/common/config.py +3 -3
  154. package/dist/templates/trellis/scripts/common/developer.py +2 -2
  155. package/dist/templates/trellis/scripts/common/execution_strategy.py +1 -1
  156. package/dist/templates/trellis/scripts/common/packages_context.py +23 -23
  157. package/dist/templates/trellis/scripts/common/parent_orchestration.py +702 -702
  158. package/dist/templates/trellis/scripts/common/paths.py +107 -107
  159. package/dist/templates/trellis/scripts/common/project_file_stats.py +1 -1
  160. package/dist/templates/trellis/scripts/common/retrieval_agent_instructions.py +1 -1
  161. package/dist/templates/trellis/scripts/common/safe_commit.py +31 -31
  162. package/dist/templates/trellis/scripts/common/session_context.py +1159 -1159
  163. package/dist/templates/trellis/scripts/common/session_memory.py +360 -360
  164. package/dist/templates/trellis/scripts/common/smart_search_evidence.py +514 -514
  165. package/dist/templates/trellis/scripts/common/smart_search_resolve.py +1 -1
  166. package/dist/templates/trellis/scripts/common/subagent_dispatch.py +7 -7
  167. package/dist/templates/trellis/scripts/common/task_context.py +1 -1
  168. package/dist/templates/trellis/scripts/common/task_dashboard.py +140 -140
  169. package/dist/templates/trellis/scripts/common/task_gates.py +2056 -2034
  170. package/dist/templates/trellis/scripts/common/task_store.py +1594 -1594
  171. package/dist/templates/trellis/scripts/common/task_utils.py +3 -3
  172. package/dist/templates/trellis/scripts/common/tasks.py +1 -1
  173. package/dist/templates/trellis/scripts/common/trellis_config.py +3 -3
  174. package/dist/templates/trellis/scripts/common/workflow_phase.py +1 -1
  175. package/dist/templates/trellis/scripts/cursor_retrieval_probe.py +3 -3
  176. package/dist/templates/trellis/scripts/cursor_retrieval_probe_prompt.md +11 -11
  177. package/dist/templates/trellis/scripts/hooks/linear_sync.py +8 -8
  178. package/dist/templates/trellis/scripts/init_developer.py +2 -2
  179. package/dist/templates/trellis/scripts/retrieval_probe_matrix_template.json +4 -4
  180. package/dist/templates/trellis/scripts/route_codebase_retrieval.py +1 -1
  181. package/dist/templates/trellis/scripts/task.py +918 -918
  182. package/dist/templates/trellis/tasks/templates/release-readiness/implement.md +2 -2
  183. package/dist/templates/trellis/workflow.md +805 -805
  184. package/dist/types/ai-tools.d.ts +1 -1
  185. package/dist/types/ai-tools.d.ts.map +1 -1
  186. package/dist/types/ai-tools.js +1 -1
  187. package/dist/types/ai-tools.js.map +1 -1
  188. package/dist/types/migration.d.ts +1 -1
  189. package/dist/types/migration.d.ts.map +1 -1
  190. package/dist/utils/agents-md.d.ts +37 -0
  191. package/dist/utils/agents-md.d.ts.map +1 -0
  192. package/dist/utils/agents-md.js +82 -0
  193. package/dist/utils/agents-md.js.map +1 -0
  194. package/dist/utils/codebase-retrieval-router.js +5 -5
  195. package/dist/utils/codebase-retrieval-router.js.map +1 -1
  196. package/dist/utils/manifest-prune.d.ts +2 -2
  197. package/dist/utils/manifest-prune.js +4 -4
  198. package/dist/utils/manifest-prune.js.map +1 -1
  199. package/dist/utils/mirror-check.d.ts +3 -1
  200. package/dist/utils/mirror-check.d.ts.map +1 -1
  201. package/dist/utils/mirror-check.js +22 -11
  202. package/dist/utils/mirror-check.js.map +1 -1
  203. package/dist/utils/project-capabilities.d.ts +14 -3
  204. package/dist/utils/project-capabilities.d.ts.map +1 -1
  205. package/dist/utils/project-capabilities.js +127 -17
  206. package/dist/utils/project-capabilities.js.map +1 -1
  207. package/dist/utils/readiness.d.ts +10 -0
  208. package/dist/utils/readiness.d.ts.map +1 -1
  209. package/dist/utils/readiness.js +6 -3
  210. package/dist/utils/readiness.js.map +1 -1
  211. package/dist/utils/retrieval-agent-instructions.js +1 -1
  212. package/dist/utils/retrieval-agent-instructions.js.map +1 -1
  213. package/dist/utils/retrieval-execution-telemetry.js +1 -1
  214. package/dist/utils/retrieval-execution-telemetry.js.map +1 -1
  215. package/dist/utils/template-fetcher.js +1 -1
  216. package/dist/utils/template-fetcher.js.map +1 -1
  217. package/dist/utils/template-hash.d.ts +2 -2
  218. package/dist/utils/template-hash.d.ts.map +1 -1
  219. package/dist/utils/template-hash.js +12 -10
  220. package/dist/utils/template-hash.js.map +1 -1
  221. package/dist/utils/workflow-dir.d.ts +13 -0
  222. package/dist/utils/workflow-dir.d.ts.map +1 -0
  223. package/dist/utils/workflow-dir.js +35 -0
  224. package/dist/utils/workflow-dir.js.map +1 -0
  225. package/dist/utils/workflow-ownership.d.ts +36 -0
  226. package/dist/utils/workflow-ownership.d.ts.map +1 -0
  227. package/dist/utils/workflow-ownership.js +137 -0
  228. package/dist/utils/workflow-ownership.js.map +1 -0
  229. package/dist/utils/workflow-resolver.d.ts +1 -1
  230. package/dist/utils/workflow-resolver.js +1 -1
  231. package/package.json +3 -4
  232. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +0 -83
  233. /package/bin/{trellis.js → cstl.js} +0 -0
  234. /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/mcp-setup.md +0 -0
@@ -24,7 +24,7 @@ max_journal_lines: 2000
24
24
  # - false: scripts do not touch git. Files (journal-*.md, task archive moves)
25
25
  # are still written to disk; you decide whether to git add / commit.
26
26
  #
27
- # Use `false` if your project's .gitignore intentionally excludes `.trellis/`
27
+ # Use `false` if your project's .gitignore intentionally excludes `.cstl/`
28
28
  # and you want session data kept local-only, or if you prefer to review
29
29
  # staged changes manually before each commit.
30
30
  #
@@ -55,7 +55,7 @@ max_journal_lines: 2000
55
55
  #-------------------------------------------------------------------------------
56
56
 
57
57
  # Declare packages for monorepo projects.
58
- # Trellis auto-detects workspaces during `trellis init`, but you can also
58
+ # Trellis auto-detects workspaces during `cstl init`, but you can also
59
59
  # configure them manually here.
60
60
  #
61
61
  # packages:
@@ -88,7 +88,7 @@ max_journal_lines: 2000
88
88
  #-------------------------------------------------------------------------------
89
89
  # Cursor subagent dispatch (documentation only — not Cursor product settings)
90
90
  #-------------------------------------------------------------------------------
91
- # See .trellis/spec/guides/cursor-subagent-policy.md
91
+ # See .cstl/spec/guides/cursor-subagent-policy.md
92
92
  #
93
93
  # cursor:
94
94
  # subagent_dispatch:
@@ -98,26 +98,6 @@ max_journal_lines: 2000
98
98
  # mode: separate_writable_agent_session
99
99
  # reuse_policy: true
100
100
 
101
- #-------------------------------------------------------------------------------
102
- # Channel worker OOM guard
103
- #-------------------------------------------------------------------------------
104
- # Default safeguards for `trellis channel spawn` workers. The guard runs
105
- # at spawn time (cleans expired idle workers, then enforces the live-worker
106
- # budget) and inside each supervisor (self-terminates a worker that stays
107
- # continuously idle past `idle_timeout`).
108
- #
109
- # Precedence: CLI flag > env var (TRELLIS_CHANNEL_WORKER_IDLE_TIMEOUT /
110
- # TRELLIS_CHANNEL_MAX_LIVE_WORKERS) > this config > built-in default.
111
- #
112
- # `idle_timeout: 0` disables idle cleanup (workers can sit idle forever
113
- # unless explicitly killed or given `--timeout`).
114
- # `max_live_workers: 0` disables the spawn-time budget check.
115
- #
116
- channel:
117
- worker_guard:
118
- idle_timeout: 5m
119
- max_live_workers: 6
120
-
121
101
  #-------------------------------------------------------------------------------
122
102
  # Codex (dispatch behavior)
123
103
  #-------------------------------------------------------------------------------
@@ -125,8 +105,8 @@ channel:
125
105
  # main Codex agent edit code directly because Codex sub-agents run with
126
106
  # `fork_turns="none"` isolation and can't inherit the parent session's
127
107
  # task context. Set to "sub-agent" to opt into the legacy dispatch model
128
- # (main agent spawns trellis-implement / trellis-check / trellis-research
108
+ # (main agent spawns cstl-implement / cstl-check / cstl-research
129
109
  # sub-agents).
130
110
  #
131
111
  # codex:
132
- # dispatch_mode: inline # or "sub-agent" to dispatch trellis-* sub-agents
112
+ # dispatch_mode: inline # or "sub-agent" to dispatch cstl-* sub-agents
@@ -2,7 +2,7 @@
2
2
  * Trellis workflow templates
3
3
  *
4
4
  * These are GENERIC templates for user projects.
5
- * Do NOT use Trellis project's own .trellis/ directory (which may be customized).
5
+ * Do NOT use Trellis project's own .cstl/ directory (which may be customized).
6
6
  *
7
7
  * Directory structure:
8
8
  * trellis/
@@ -80,7 +80,7 @@ export declare const workflowMdTemplate: string;
80
80
  export declare const configYamlTemplate: string;
81
81
  export declare const gitignoreTemplate: string;
82
82
  /**
83
- * Optional task artifact templates (under `.trellis/tasks/templates/`).
83
+ * Optional task artifact templates (under `.cstl/tasks/templates/`).
84
84
  * Not applied by `task.py create`; copy into a new task directory when starting
85
85
  * release-readiness or release-execution work.
86
86
  */
@@ -2,7 +2,7 @@
2
2
  * Trellis workflow templates
3
3
  *
4
4
  * These are GENERIC templates for user projects.
5
- * Do NOT use Trellis project's own .trellis/ directory (which may be customized).
5
+ * Do NOT use Trellis project's own .cstl/ directory (which may be customized).
6
6
  *
7
7
  * Directory structure:
8
8
  * trellis/
@@ -107,7 +107,7 @@ function readTaskTemplate(relativePath) {
107
107
  return readTemplate(join("tasks", "templates", relativePath));
108
108
  }
109
109
  /**
110
- * Optional task artifact templates (under `.trellis/tasks/templates/`).
110
+ * Optional task artifact templates (under `.cstl/tasks/templates/`).
111
111
  * Not applied by `task.py create`; copy into a new task directory when starting
112
112
  * release-readiness or release-execution work.
113
113
  */
@@ -1,8 +1,10 @@
1
1
  # Cursor++ Local Bundle
2
2
 
3
- > **Native Cursor users:** safe to ignore or delete this directory unless using **Cursor++ BYOK**.
3
+ > **Native Cursor users:** safe to ignore or delete this directory unless using **Cursor++ BYOK** on **this repo**.
4
4
 
5
- **Who needs this:** Cursor IDE with [Cursor++](https://ccursor.cometix.dev) (BYOK proxy). Method 2.5 patches the `WPeLc8` resolver so Trellis Task subagents get per-role BYOK slugs instead of inheriting the parent model.
5
+ **Coexistence:** Native and BYOK can run on the same machine across different projects. This bundle is **per-repo** (`cstl init --cursor --cursor2plus`); sibling repos may use `cstl init --cursor` only. Full guide: cursor-trellis `docs/cursor.md` section *Native and BYOK coexistence (not either/or)*.
6
+
7
+ **Who needs this:** Cursor IDE with [Cursor++](https://ccursor.cometix.dev) (BYOK proxy). Method 2.5 patches the Cursor++ task model resolver (historically located via `WPeLc8` in verified builds) so Trellis Task subagents get per-role BYOK slugs instead of inheriting the parent model. **After any Cursor or Cursor++ upgrade**, run `python patch_wpelc8.py --check-compat` before re-applying.
6
8
 
7
9
  ## Bundle files
8
10
 
@@ -18,7 +20,7 @@ User-wide model doc: `~/.ccursor/trellis-task-models.json5` (see `../trellis-tas
18
20
 
19
21
  ## Compatibility window
20
22
 
21
- - **Verified:** Cursor **3.7.27** / Cursor++ **v0.0.11** (see `.trellis/spec/guides/cursor-subagent-policy.md`, 2026-06-18)
23
+ - **Verified:** Cursor **3.7.27** / Cursor++ **v0.0.11** (see `.cstl/spec/guides/cursor-subagent-policy.md`, 2026-06-18)
22
24
  - **Re-verify** after any Cursor or Cursor++ upgrade: `python patch_wpelc8.py --check-compat`
23
25
  - If `--check-compat` reports `fail` or `unknown`, treat the patch as stale until you re-apply or revert
24
26
 
@@ -28,15 +30,15 @@ User-wide model doc: `~/.ccursor/trellis-task-models.json5` (see `../trellis-tas
28
30
  2. **Operator approval** — review map and compat output; decide to proceed
29
31
  3. **Apply** — `python patch_wpelc8.py --apply --approve` (writes `extension.js`)
30
32
  4. **Reload Cursor** — Developer: Reload Window (once per apply/revert)
31
- 5. **A ≠ B probe** — parent chat model must differ from a patched subagent map target; dispatch a `trellis-*` Task and confirm the subagent self-reports the **map target** slug/model, not the parent
33
+ 5. **A ≠ B probe** — parent chat model must differ from a patched subagent map target; dispatch a `cstl-*` Task and confirm the subagent self-reports the **map target** slug/model, not the parent
32
34
  6. **Revert if needed** — `python patch_wpelc8.py --revert` then Reload Window
33
35
 
34
- Agent-led setup: run skill **`trellis-cursor2plus-setup`** in Cursor Agent (lists models, writes JSON5, runs patch steps).
36
+ Agent-led setup: run skill **`cstl-cursor2plus-setup`** in Cursor Agent (lists models, writes JSON5, runs patch steps).
35
37
 
36
38
  ## Revert recipe
37
39
 
38
40
  ```bash
39
- cd .trellis/local/cursor2plus
41
+ cd .cstl/local/cursor2plus
40
42
  python patch_wpelc8.py --revert
41
43
  ```
42
44
 
@@ -47,10 +49,10 @@ Then **Developer: Reload Window**. Subagents return to **inherit parent** BYOK m
47
49
  Goal: prove the patch routes **subagent** model independently of the **parent** session model.
48
50
 
49
51
  1. Set parent chat to model **A** (any BYOK model in Cursor++).
50
- 2. Ensure `trellis-task-models.json5` maps e.g. `trellis-implement` to model **B** (`primary`/`fallback` resolving to a different slug than A).
51
- 3. `python patch_wpelc8.py --print-map` — note the slug for `trellis-implement` (= map target **B**).
52
+ 2. Ensure `trellis-task-models.json5` maps e.g. `cstl-implement` to model **B** (`primary`/`fallback` resolving to a different slug than A).
53
+ 3. `python patch_wpelc8.py --print-map` — note the slug for `cstl-implement` (= map target **B**).
52
54
  4. `python patch_wpelc8.py --apply --approve` → Reload Window.
53
- 5. Dispatch a `trellis-implement` Task from a parent on model **A**.
55
+ 5. Dispatch a `cstl-implement` Task from a parent on model **A**.
54
56
  6. **Pass:** subagent self-report / trace shows **B** (map target), not **A**.
55
57
  7. **Fail:** subagent shows **A** → patch stale or not applied; run `--check-compat`, re-patch, or `--revert`.
56
58
 
@@ -73,11 +75,11 @@ python smoke.py # env + patch_status smoke
73
75
 
74
76
  | JSON key (under `models`) | Meaning |
75
77
  |---------------------------|---------|
76
- | `trellis-research` | Trellis research Task subagent |
77
- | `trellis-implement` | Trellis implement (+ Parent/Child default Task) |
78
- | `trellis-check` | Trellis check Task subagent |
78
+ | `cstl-research` | Trellis research Task subagent |
79
+ | `cstl-implement` | Trellis implement (+ Parent/Child default Task) |
80
+ | `cstl-check` | Trellis check Task subagent |
79
81
  | `generalPurpose` / `shell` / `best-of-n-runner` | Cursor built-in Task types |
80
82
 
81
83
  Each role: `{ "primary": "<name>", "fallback": "<name>" }`. Names: **apiModel** or **displayName** from Cursor++ (`--list-models`). **Explore** is not in this file — use the Cursor++ panel.
82
84
 
83
- Policy: `.trellis/spec/guides/cursor-subagent-policy.md` (Method 2.5 / 2.6).
85
+ Policy: `.cstl/spec/guides/cursor-subagent-policy.md` (Method 2.5 / 2.6).
@@ -23,7 +23,7 @@ INJECT_NEEDLE = "});return!UbAQWn||"
23
23
  def _repo_root(start: Path) -> Path:
24
24
  cur = start.resolve()
25
25
  for _ in range(12):
26
- if (cur / ".trellis").is_dir():
26
+ if (cur / ".cstl").is_dir():
27
27
  return cur
28
28
  if cur.parent == cur:
29
29
  break
@@ -94,8 +94,8 @@ def resolve_project_models_path(bundle_dir: Path, config: dict) -> Path | None:
94
94
  p = Path(config["projectModelsJson"].strip()).expanduser()
95
95
  return p if p.is_file() else None
96
96
  return _first_existing(
97
- root / ".trellis" / "local" / "subagent-models.json5",
98
- root / ".trellis" / "local" / "subagent-models.json",
97
+ root / ".cstl" / "local" / "subagent-models.json5",
98
+ root / ".cstl" / "local" / "subagent-models.json",
99
99
  )
100
100
 
101
101
 
@@ -166,8 +166,8 @@ def try_resolve_extension_js(bundle_dir: Path, config: dict) -> Path | None:
166
166
  def build_inject_block(model_map: dict[str, str]) -> str:
167
167
  if not model_map:
168
168
  raise SystemExit(
169
- "model map empty — use skill trellis-cursor2plus-setup or write "
170
- "~/.ccursor/trellis-task-models.json5 (see .trellis/local/trellis-task-models.json5.example)"
169
+ "model map empty — use skill cstl-cursor2plus-setup or write "
170
+ "~/.ccursor/trellis-task-models.json5 (see .cstl/local/trellis-task-models.json5.example)"
171
171
  )
172
172
  pairs = ",".join(f'"{k}":"{v}"' for k, v in sorted(model_map.items()))
173
173
  return (
@@ -240,7 +240,7 @@ def cmd_explain() -> None:
240
240
  print(f" {key}")
241
241
  print(f" → {SUBAGENT_TYPE_HELP.get(key, '')}")
242
242
  print()
243
- print("Skill: trellis-cursor2plus-setup (init 后与大模型交互完成配置)")
243
+ print("Skill: cstl-cursor2plus-setup (init 后与大模型交互完成配置)")
244
244
 
245
245
 
246
246
  def cmd_list_models(providers_path: Path) -> None:
@@ -272,7 +272,7 @@ def cmd_bootstrap(bundle_dir: Path) -> None:
272
272
  config["extensionJs"] = path
273
273
  cfg_out.write_text(json.dumps(config, indent=2) + "\n", encoding="utf-8")
274
274
  print("wrote", cfg_out)
275
- print("Next: in Cursor Agent, run skill trellis-cursor2plus-setup", file=sys.stderr)
275
+ print("Next: in Cursor Agent, run skill cstl-cursor2plus-setup", file=sys.stderr)
276
276
 
277
277
 
278
278
  def cmd_check_compat(bundle_dir: Path, config: dict) -> int:
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_comment": "Optional repo overrides (~/.ccursor/trellis-task-models.json is user-wide). Same value rules: apiModel, displayName, or model-xxxxx slug. Project wins on same key.",
3
- "trellis-implement": "qwen3.6-plus"
3
+ "cstl-implement": "qwen3.6-plus"
4
4
  }
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "_comment": "Copy to ~/.ccursor/trellis-task-models.json (Windows: %USERPROFILE%\\.ccursor\\). Values: use apiModel or displayName from Cursor++ — patch_wpelc8.py resolves to slug at patch time. Optional keys: omit types you do not use.",
3
3
  "_when_providers_change": "Run: python patch_wpelc8.py --list-models then fix this file and patch again.",
4
- "trellis-research": "glm-5.1",
5
- "trellis-implement": "qwen3.6-plus",
6
- "trellis-check": "qwen3.7-max",
4
+ "cstl-research": "glm-5.1",
5
+ "cstl-implement": "qwen3.6-plus",
6
+ "cstl-check": "qwen3.7-max",
7
7
  "generalPurpose": "gpt-5.5",
8
8
  "shell": "grok-composer-2.5-fast",
9
9
  "best-of-n-runner": "kimi-k2.7-code"
@@ -10,20 +10,20 @@
10
10
 
11
11
  {
12
12
  "models": {
13
- // Trellis 调研(Task trellis-research)
14
- "trellis-research": {
13
+ // Trellis 调研(Task cstl-research)
14
+ "cstl-research": {
15
15
  "primary": "glm-5.1",
16
16
  "fallback": "qwen3.7-max"
17
17
  },
18
18
 
19
19
  // Trellis 实现;Parent generate-child-prompt --mode subagent 默认派发此类型
20
- "trellis-implement": {
20
+ "cstl-implement": {
21
21
  "primary": "qwen3.6-plus",
22
22
  "fallback": "kimi-k2.7-code"
23
23
  },
24
24
 
25
- // Trellis 验收(Task trellis-check)
26
- "trellis-check": {
25
+ // Trellis 验收(Task cstl-check)
26
+ "cstl-check": {
27
27
  "primary": "qwen3.7-max",
28
28
  "fallback": "glm-5.1"
29
29
  },
@@ -6,18 +6,18 @@ from pathlib import Path
6
6
  from typing import Any
7
7
 
8
8
  KNOWN_SUBAGENT_TYPES = (
9
- "trellis-research",
10
- "trellis-implement",
11
- "trellis-check",
9
+ "cstl-research",
10
+ "cstl-implement",
11
+ "cstl-check",
12
12
  "generalPurpose",
13
13
  "shell",
14
14
  "best-of-n-runner",
15
15
  )
16
16
 
17
17
  SUBAGENT_TYPE_HELP: dict[str, str] = {
18
- "trellis-research": "Trellis 调研 Task(trellis-research)",
19
- "trellis-implement": "Trellis 实现 Task;Parent/Child 默认派发类型",
20
- "trellis-check": "Trellis 验收 Task(trellis-check)",
18
+ "cstl-research": "Trellis 调研 Task(cstl-research)",
19
+ "cstl-implement": "Trellis 实现 Task;Parent/Child 默认派发类型",
20
+ "cstl-check": "Trellis 验收 Task(cstl-check)",
21
21
  "generalPurpose": "Cursor 内置 Task:generalPurpose",
22
22
  "shell": "Cursor 内置 Task:shell",
23
23
  "best-of-n-runner": "Cursor 内置 Task:best-of-n-runner",
@@ -12,11 +12,11 @@ Usage:
12
12
  <session content here>
13
13
  EOF
14
14
 
15
- Branch resolution order:
16
- 1. --branch CLI arg (explicit)
17
- 2. task.json branch field (from selected task)
18
- 3. git branch --show-current (auto-detect)
19
- 4. None (omitted gracefully)
15
+ Branch resolution order:
16
+ 1. --branch CLI arg (explicit)
17
+ 2. task.json branch field (from selected task)
18
+ 3. git branch --show-current (auto-detect)
19
+ 4. None (omitted gracefully)
20
20
  """
21
21
 
22
22
  from __future__ import annotations
@@ -28,12 +28,12 @@ from datetime import datetime
28
28
  from pathlib import Path
29
29
 
30
30
  from common.paths import (
31
- FILE_JOURNAL_PREFIX,
32
- get_repo_root,
33
- get_selected_task,
34
- get_developer,
35
- get_workspace_dir,
36
- )
31
+ FILE_JOURNAL_PREFIX,
32
+ get_repo_root,
33
+ get_selected_task,
34
+ get_developer,
35
+ get_workspace_dir,
36
+ )
37
37
  from common.developer import ensure_developer
38
38
  from common.git import run_git
39
39
  from common.safe_commit import (
@@ -322,11 +322,11 @@ def _auto_commit_workspace(repo_root: Path) -> None:
322
322
  """Stage Trellis-owned workspace + task paths and commit.
323
323
 
324
324
  Path scope is restricted to specific products (journal files, index.md,
325
- selected task dirs, the archive subtree). We never `git add` the whole
326
- `.trellis/` tree, and if `.gitignore` blocks the specific paths we
325
+ selected task dirs, the archive subtree). We never `git add` the whole
326
+ `.cstl/` tree, and if `.gitignore` blocks the specific paths we
327
327
  warn + skip — never retry with ``-f``.
328
328
 
329
- Honors ``session_auto_commit`` in ``.trellis/config.yaml``: when set to
329
+ Honors ``session_auto_commit`` in ``.cstl/config.yaml``: when set to
330
330
  ``false``, this function returns immediately without touching git
331
331
  (journal/index files are still written to disk by the caller).
332
332
  """
@@ -502,10 +502,10 @@ def main() -> int:
502
502
  elif args.stdin:
503
503
  extra_content = sys.stdin.read()
504
504
 
505
- # Load selected task once — shared by package and branch resolution
506
- repo_root = get_repo_root()
507
- selected = get_selected_task(repo_root)
508
- task_data = load_task(repo_root / selected) if selected else None
505
+ # Load selected task once — shared by package and branch resolution
506
+ repo_root = get_repo_root()
507
+ selected = get_selected_task(repo_root)
508
+ task_data = load_task(repo_root / selected) if selected else None
509
509
 
510
510
  package = args.package
511
511
  if package:
@@ -519,8 +519,8 @@ def main() -> int:
519
519
  print(f"Error: unknown package '{package}'. Available: {available}", file=sys.stderr)
520
520
  return 1
521
521
  else:
522
- # Inferred: selected task's task.json.package → default_package → None
523
- task_package = task_data.package if task_data else None
522
+ # Inferred: selected task's task.json.package → default_package → None
523
+ task_package = task_data.package if task_data else None
524
524
  package = resolve_package(task_package, repo_root)
525
525
 
526
526
  # Resolve branch: CLI → task.json → git auto-detect → None
@@ -2,7 +2,7 @@
2
2
  """Session-scoped selected task resolution.
3
3
 
4
4
  The user-facing concept is a live-session "selected task". Trellis stores that
5
- pointer per AI session/window under `.trellis/.runtime/sessions/`; without a
5
+ pointer per AI session/window under `.cstl/.runtime/sessions/`; without a
6
6
  stable session key there is no selected task.
7
7
  """
8
8
 
@@ -19,7 +19,7 @@ from datetime import datetime, timezone
19
19
  from pathlib import Path
20
20
  from typing import Any
21
21
 
22
- DIR_WORKFLOW = ".trellis"
22
+ DIR_WORKFLOW = ".cstl"
23
23
  DIR_TASKS = "tasks"
24
24
  DIR_RUNTIME = ".runtime"
25
25
  DIR_SESSIONS = "sessions"