@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
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: trellis-research
2
+ name: cstl-research
3
3
  description: Trellis research agent. Use this exact agent for Trellis task research and research/ persistence. Do not use generic/default/generalPurpose agents for Trellis research.
4
4
  tools: Read, Write, Glob, Grep, Bash, WebSearch, WebFetch, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa, Skill, mcp__chrome-devtools__*
5
5
  ---
@@ -7,11 +7,11 @@ tools: Read, Write, Glob, Grep, Bash, WebSearch, WebFetch, mcp__exa__web_search_
7
7
  ## Entry points
8
8
 
9
9
  - **Agent session:** Open this agent file manually in a new chat — context from this file + your main-session prompt.
10
- - **Task dispatch:** Run `python ./.trellis/scripts/generate_dispatch_prompt.py --agent research` → pass stdout as `Task(..., prompt=...)` — context from the Layer 2 prompt.
10
+ - **Task dispatch:** Run `python ./.cstl/scripts/generate_dispatch_prompt.py --agent research` → pass stdout as `Task(..., prompt=...)` — context from the Layer 2 prompt.
11
11
 
12
12
  ## Context source
13
13
 
14
- - **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(trellis-research)`.
14
+ - **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(cstl-research)`.
15
15
  - **Hook `additional_context` = best-effort only** — Cursor #158452: not guaranteed to reach the model; optimization / fallback only.
16
16
 
17
17
  # Research Agent
@@ -21,7 +21,7 @@ You are the Research Agent in the Trellis workflow.
21
21
  ## Model policy
22
22
 
23
23
  - **Default:** no `model:` in this file → **inherit** parent session at spawn.
24
- - **Per dispatch:** main session asks the user, writes a **one-shot** `model:` here, runs `Task`, then **removes** `model:` (ephemeral overlay). See `.trellis/spec/guides/cursor-subagent-policy.md`.
24
+ - **Per dispatch:** main session asks the user, writes a **one-shot** `model:` here, runs `Task`, then **removes** `model:` (ephemeral overlay). See `.cstl/spec/guides/cursor-subagent-policy.md`.
25
25
  - Dispatch: Cursor **Agent mode** (writable).
26
26
 
27
27
  ## Core Principle
@@ -50,7 +50,7 @@ Conversations get compacted; files don't. Every research output MUST end up as a
50
50
 
51
51
  ### Step 1: Resolve Selected Task
52
52
 
53
- Run `python ./.trellis/scripts/task.py selected --source` → selected task path. If no task is selected, ask the user where to write output; do NOT guess.
53
+ Run `python ./.cstl/scripts/task.py selected --source` → selected task path. If no task is selected, ask the user where to write output; do NOT guess.
54
54
 
55
55
  Ensure `{TASK_DIR}/research/` exists:
56
56
 
@@ -68,9 +68,9 @@ Run independent searches in parallel (Glob + Grep + smart-search CLI for externa
68
68
 
69
69
  #### External search — provider relevance caveats
70
70
 
71
- - **Context7** and generic third-party library docs are often **irrelevant** to Trellis/Cursor platform questions. Prefer **Cursor / Cursor++ official documentation**, `docs.cursor.com`, and **local `.trellis/spec/`** before trusting Context7 hits.
71
+ - **Context7** and generic third-party library docs are often **irrelevant** to Trellis/Cursor platform questions. Prefer **Cursor / Cursor++ official documentation**, `docs.cursor.com`, and **local `.cstl/spec/`** before trusting Context7 hits.
72
72
  - Every smart-search result you persist must **label the provider source** (e.g. `exa`, `context7`, `cursor-docs`, `tavily`) in the research file — in frontmatter or per bullet — so downstream check/finish can audit provenance.
73
- - Trellis harness facts: `./.trellis/scripts/run_smart_search.py` writes manifests under `{TASK}/research/smart-search/<run-id>/`; scored pack output (when built) is `{TASK}/research/retrieval-pack-latest.json`.
73
+ - Trellis harness facts: `./.cstl/scripts/run_smart_search.py` writes manifests under `{TASK}/research/smart-search/<run-id>/`; scored pack output (when built) is `{TASK}/research/retrieval-pack-latest.json`.
74
74
 
75
75
  #### External search — manual query refinement
76
76
 
@@ -80,7 +80,7 @@ When the first smart-search pass returns irrelevant results, **refine before fal
80
80
  2. Add product scope: `+Trellis`, `+cursor-trellis`, or the exact API/hook name
81
81
  3. Switch route: `--intent official-source --include-domain cursor.com` or `--intent docs` for API reference
82
82
  4. Narrow time or topic: shorter query, version number, or feature name from local spec
83
- 5. Re-run: `python ./.trellis/scripts/run_smart_search.py "<refined query>" --intent deep-research --json`
83
+ 5. Re-run: `python ./.cstl/scripts/run_smart_search.py "<refined query>" --intent deep-research --json`
84
84
 
85
85
  Only use Cursor WebSearch/WebFetch when smart-search is unavailable (`not_configured` / `failed` / timeout) — then persist with `source: cursor-web-fallback`.
86
86
 
@@ -110,8 +110,8 @@ Do NOT paste full research content into the reply. The files are the contract.
110
110
  ### Write FORBIDDEN
111
111
 
112
112
  - Code files (`src/`, `lib/`, …)
113
- - Spec files (`.trellis/spec/`) — main agent should use `update-spec` skill instead
114
- - `.trellis/scripts/`, `.trellis/workflow.md`, platform config (`.claude/`, `.cursor/`, etc.)
113
+ - Spec files (`.cstl/spec/`) — main agent should use `update-spec` skill instead
114
+ - `.cstl/scripts/`, `.cstl/workflow.md`, platform config (`.claude/`, `.cursor/`, etc.)
115
115
  - Other task directories
116
116
  - Any git operation (commit / push / branch / merge)
117
117
 
@@ -149,7 +149,7 @@ Each `{TASK_DIR}/research/<topic>.md` should follow:
149
149
 
150
150
  ### Related Specs
151
151
 
152
- - `.trellis/spec/xxx.md` — <description>
152
+ - `.cstl/spec/xxx.md` — <description>
153
153
 
154
154
  ## Caveats / Not Found
155
155
 
@@ -1,6 +1,6 @@
1
1
  # Trellis Cursor++ Subagent Model Setup
2
2
 
3
- Configure per-subagent-type model routing for Cursor++ BYOK. Run this after `trellis init` (when Cursor++ is selected), when providers change, or whenever you want to re-map which model each Trellis Task subagent uses.
3
+ Configure per-subagent-type model routing for Cursor++ BYOK. Run this after `cstl init` (when Cursor++ is selected), when providers change, or whenever you want to re-map which model each Trellis Task subagent uses.
4
4
 
5
5
  Native Cursor API (no Cursor++): stop — this does not apply; agent frontmatter `model:` works natively.
6
6
 
@@ -10,21 +10,21 @@ Native Cursor API (no Cursor++): stop — this does not apply; agent frontmatter
10
10
 
11
11
  Confirm the Cursor++ data directory exists:
12
12
 
13
- - `~/.ccursor/providers.json` (or a custom path in `.trellis/local/cursor2plus/config.local.json`)
13
+ - `~/.ccursor/providers.json` (or a custom path in `.cstl/local/cursor2plus/config.local.json`)
14
14
 
15
15
  If missing, Cursor++ is not set up — ask the user to install/configure it first.
16
16
 
17
17
  ## Step 2: List available models + roles
18
18
 
19
19
  ```bash
20
- python ./.trellis/local/cursor2plus/patch_wpelc8.py --list-models
21
- python ./.trellis/local/cursor2plus/patch_wpelc8.py --explain
20
+ python ./.cstl/local/cursor2plus/patch_wpelc8.py --list-models
21
+ python ./.cstl/local/cursor2plus/patch_wpelc8.py --explain
22
22
  ```
23
23
 
24
24
  `--list-models` shows the model catalog (apiModel / displayName / slug / provider) from `providers.json`.
25
25
  `--explain` lists the subagent types you can route:
26
26
 
27
- - `trellis-research`, `trellis-implement`, `trellis-check` (core Trellis roles)
27
+ - `cstl-research`, `cstl-implement`, `cstl-check` (core Trellis roles)
28
28
  - `generalPurpose`, `shell`, `best-of-n-runner` (built-in Cursor Task types, optional)
29
29
 
30
30
  ## Step 3: Ask the user which model per role
@@ -35,27 +35,27 @@ The user may skip types they don't use — omit those from the map.
35
35
 
36
36
  ## Step 4: Write the routing map
37
37
 
38
- Write `~/.ccursor/trellis-task-models.json5` (or `~/.ccursor/` on Unix) using the structure from `.trellis/local/trellis-task-models.json5.example`:
38
+ Write `~/.ccursor/trellis-task-models.json5` (or `~/.ccursor/` on Unix) using the structure from `.cstl/local/trellis-task-models.json5.example`:
39
39
 
40
40
  ```json5
41
41
  // Trellis + Cursor++ BYOK — per-subagent-type model routing
42
42
  {
43
43
  "models": {
44
44
  // <role comment>
45
- "trellis-research": { "primary": "<model>", "fallback": "<model>" },
46
- "trellis-implement": { "primary": "<model>", "fallback": "<model>" },
47
- "trellis-check": { "primary": "<model>", "fallback": "<model>" }
45
+ "cstl-research": { "primary": "<model>", "fallback": "<model>" },
46
+ "cstl-implement": { "primary": "<model>", "fallback": "<model>" },
47
+ "cstl-check": { "primary": "<model>", "fallback": "<model>" }
48
48
  }
49
49
  }
50
50
  ```
51
51
 
52
- Project-level override (optional, wins on same key): `.trellis/local/subagent-models.json5`.
52
+ Project-level override (optional, wins on same key): `.cstl/local/subagent-models.json5`.
53
53
 
54
54
  ## Step 5: Apply the patch + verify
55
55
 
56
56
  ```bash
57
- python ./.trellis/local/cursor2plus/patch_wpelc8.py --print-map
58
- python ./.trellis/local/cursor2plus/patch_wpelc8.py
57
+ python ./.cstl/local/cursor2plus/patch_wpelc8.py --print-map
58
+ python ./.cstl/local/cursor2plus/patch_wpelc8.py
59
59
  ```
60
60
 
61
61
  Then tell the user: **Developer: Reload Window** in Cursor (required once per patch for the resolver change to take effect).
@@ -76,7 +76,7 @@ Then tell the user: **Developer: Reload Window** in Cursor (required once per pa
76
76
 
77
77
  - User catalog: `~/.ccursor/providers.json`
78
78
  - User routing doc: `~/.ccursor/trellis-task-models.json5` (machine-local, gitignored)
79
- - Project override (optional): `.trellis/local/subagent-models.json5`
80
- - Patch bundle: `.trellis/local/cursor2plus/`
79
+ - Project override (optional): `.cstl/local/subagent-models.json5`
80
+ - Patch bundle: `.cstl/local/cursor2plus/`
81
81
 
82
- Policy: `.trellis/spec/guides/cursor-subagent-policy.md` (Method 2.5 / 2.6).
82
+ Policy: `.cstl/spec/guides/cursor-subagent-policy.md` (Method 2.5 / 2.6).
@@ -3,7 +3,7 @@
3
3
  * Update alongside rule content changes in templates/cursor/rules/.
4
4
  */
5
5
  export interface ExpectedRule {
6
- /** Filename including .mdc extension, e.g. "trellis-triage.mdc" */
6
+ /** Filename including .mdc extension, e.g. "cstl-triage.mdc" */
7
7
  filename: string;
8
8
  /** Substrings that must appear in rule body (case-sensitive) */
9
9
  requiredSections: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"expected-rules.d.ts","sourceRoot":"","sources":["../../../../src/templates/cursor/fixtures/expected-rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,YAAY;IAC3B,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,EAAE,YAAY,EAoBvC,CAAC"}
1
+ {"version":3,"file":"expected-rules.d.ts","sourceRoot":"","sources":["../../../../src/templates/cursor/fixtures/expected-rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,YAAY;IAC3B,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,EAAE,YAAY,EAoBvC,CAAC"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  export const expectedRules = [
6
6
  {
7
- filename: "trellis-triage.mdc",
7
+ filename: "cstl-triage.mdc",
8
8
  requiredSections: [
9
9
  "Decision tree",
10
10
  "Classification mark",
@@ -13,7 +13,7 @@ export const expectedRules = [
13
13
  minBytes: 500,
14
14
  },
15
15
  {
16
- filename: "trellis-subagent-dispatch.mdc",
16
+ filename: "cstl-subagent-dispatch.mdc",
17
17
  requiredSections: ["Layer 2", "generate_dispatch_prompt", "CLI"],
18
18
  minBytes: 400,
19
19
  },
@@ -1 +1 @@
1
- {"version":3,"file":"expected-rules.js","sourceRoot":"","sources":["../../../../src/templates/cursor/fixtures/expected-rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC3C;QACE,QAAQ,EAAE,oBAAoB;QAC9B,gBAAgB,EAAE;YAChB,eAAe;YACf,qBAAqB;YACrB,cAAc;SACf;QACD,QAAQ,EAAE,GAAG;KACd;IACD;QACE,QAAQ,EAAE,+BAA+B;QACzC,gBAAgB,EAAE,CAAC,SAAS,EAAE,0BAA0B,EAAE,KAAK,CAAC;QAChE,QAAQ,EAAE,GAAG;KACd;IACD;QACE,QAAQ,EAAE,uBAAuB;QACjC,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,CAAC;QACjE,QAAQ,EAAE,GAAG;KACd;CACF,CAAC"}
1
+ {"version":3,"file":"expected-rules.js","sourceRoot":"","sources":["../../../../src/templates/cursor/fixtures/expected-rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC3C;QACE,QAAQ,EAAE,iBAAiB;QAC3B,gBAAgB,EAAE;YAChB,eAAe;YACf,qBAAqB;YACrB,cAAc;SACf;QACD,QAAQ,EAAE,GAAG;KACd;IACD;QACE,QAAQ,EAAE,4BAA4B;QACtC,gBAAgB,EAAE,CAAC,SAAS,EAAE,0BAA0B,EAAE,KAAK,CAAC;QAChE,QAAQ,EAAE,GAAG;KACd;IACD;QACE,QAAQ,EAAE,uBAAuB;QACjC,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,CAAC;QACjE,QAAQ,EAAE,GAAG;KACd;CACF,CAAC"}
@@ -9,12 +9,12 @@ alwaysApply: true
9
9
 
10
10
  ## Rule
11
11
 
12
- Before calling `Task(subagent_type="trellis-research|trellis-implement|trellis-check", ...)` you MUST:
12
+ Before calling `Task(subagent_type="cstl-research|cstl-implement|cstl-check", ...)` you MUST:
13
13
 
14
14
  1. Generate a complete dispatch prompt via CLI:
15
15
 
16
16
  ```powershell
17
- python ./.trellis/scripts/generate_dispatch_prompt.py --agent <research|implement|check> --task "<task-path>" --repo-root "<repo-root>"
17
+ python ./.cstl/scripts/generate_dispatch_prompt.py --agent <research|implement|check> --task "<task-path>" --repo-root "<repo-root>"
18
18
  ```
19
19
 
20
20
  2. Use the CLI output as the `prompt` parameter value for `Task(...)`.
@@ -27,8 +27,8 @@ The generated prompt carries role identity ("You are the Trellis Research/Implem
27
27
 
28
28
  ## Auto-detection
29
29
 
30
- If `--task` is omitted, the script resolves the currently selected task. If `--repo-root` is omitted, it auto-detects via `.trellis` or `.git` upward search.
30
+ If `--task` is omitted, the script resolves the currently selected task. If `--repo-root` is omitted, it auto-detects via `.cstl` or `.git` upward search.
31
31
 
32
32
  ## Exception
33
33
 
34
- This rule does NOT apply to `generalPurpose`, `explore`, `shell`, or other non-Trellis subagent types. Only `trellis-research`, `trellis-implement`, `trellis-check` require CLI-generated prompts.
34
+ This rule does NOT apply to `generalPurpose`, `explore`, `shell`, or other non-Trellis subagent types. Only `cstl-research`, `cstl-implement`, `cstl-check` require CLI-generated prompts.
@@ -10,7 +10,7 @@ You MUST classify every work-capable user request BEFORE acting. This is not a s
10
10
  ## Decision tree (first match wins)
11
11
 
12
12
  1. **No durable project change** (explanation, status, read-only lookup, one-liner Q&A) → `No Task`
13
- 2. **Underspecified small request, no task yet** (needs clarification before work exists) → `Micro-Grill` (load `trellis-micro-grill`)
13
+ 2. **Underspecified small request, no task yet** (needs clarification before work exists) → `Micro-Grill` (load `cstl-micro-grill`)
14
14
  3. **Low-risk durable work, single file, local validation, no contract change** → `Lite Task`
15
15
  4. **Durable code/template/runtime/workflow change, cross-file behavior, or framework semantics** → `Full Task`
16
16
  5. **Multiple independent deliverables, staged/parallel execution, or integration authority** → `Parent Task`
@@ -33,6 +33,6 @@ If the user declines a task for a simple request, skip Trellis for this session.
33
33
 
34
34
  ## Why this rule exists
35
35
 
36
- Cursor's `sessionStart` hook has a confirmed bug (#158452): `additional_context` is never injected into the agent's system context. The Triage rules in `.trellis/workflow.md` therefore never reach you via that channel. This `.cursor/rules` file is the reliable workaround — Cursor prepends rules to your context before every prompt, independent of the broken sessionStart path.
36
+ Cursor's `sessionStart` hook has a confirmed bug (#158452): `additional_context` is never injected into the agent's system context. The Triage rules in `.cstl/workflow.md` therefore never reach you via that channel. This `.cursor/rules` file is the reliable workaround — Cursor prepends rules to your context before every prompt, independent of the broken sessionStart path.
37
37
 
38
- Full decision-tree details, trigger-signal keywords, and the Task Ladder table: see `.trellis/workflow.md` → `### Request Triage`.
38
+ Full decision-tree details, trigger-signal keywords, and the Task Ladder table: see `.cstl/workflow.md` → `### Request Triage`.
@@ -18,13 +18,13 @@ If the user message or Trellis context contains a block starting with `## 代码
18
18
  Generate a fresh plan when needed:
19
19
 
20
20
  ```powershell
21
- python ./.trellis/scripts/route_codebase_retrieval.py "<question>" --instructions
21
+ python ./.cstl/scripts/route_codebase_retrieval.py "<question>" --instructions
22
22
  ```
23
23
 
24
24
  JSON (includes `agentInstructions`):
25
25
 
26
26
  ```powershell
27
- python ./.trellis/scripts/route_codebase_retrieval.py "<question>" --json
27
+ python ./.cstl/scripts/route_codebase_retrieval.py "<question>" --json
28
28
  ```
29
29
 
30
30
  ## Default tool order (no plan block)
@@ -36,7 +36,7 @@ python ./.trellis/scripts/route_codebase_retrieval.py "<question>" --json
36
36
  | Same name across packages (trap) | **codegraph_search** / **codegraph_explore** → Grep |
37
37
  | Extension symbols | **codegraph_search** under `extensions/` |
38
38
  | Conceptual / how does X work | **Native:** built-in `@codebase` / semantic search. **BYOK:** **fast_context_search** (fast-context MCP). Plans show `cursorEnv`. |
39
- | Policy / architecture / boundaries / storage rules | **Grep** on `AGENTS.md`, `**/AGENTS.md`, `.trellis/spec/**`, `README.md` (router `policy-docs-rg`) before implementation modules |
39
+ | Policy / architecture / boundaries / storage rules | **Grep** on `AGENTS.md`, `**/AGENTS.md`, `.cstl/spec/**`, `README.md` (router `policy-docs-rg`) before implementation modules |
40
40
  | Definition jump | **codegraph_node** / **codegraph_search**, then **Read** (Agent does not expose GO_TO_DEFINITION / LSP) |
41
41
  | Wide cross-cutting explore | **Native:** DEEP_SEARCH or Explore subagent. **BYOK:** **Task explore** subagent, then Grep/codegraph/Read |
42
42
 
@@ -56,4 +56,4 @@ Use codegraph for **call chains**, **cross-package trap disambiguation**, **exte
56
56
 
57
57
  ## External facts
58
58
 
59
- Web/current events: **smart-search** first per `.trellis/spec/guides/retrieval-daily-guide.md`.
59
+ Web/current events: **smart-search** first per `.cstl/spec/guides/retrieval-daily-guide.md`.
@@ -1,6 +1,6 @@
1
1
  type TemplateCategory = "scripts" | "markdown" | "commands";
2
2
  /**
3
- * Get the path to the trellis templates directory (.trellis/ scaffolding).
3
+ * Get the path to the trellis templates directory (.cstl/ scaffolding).
4
4
  */
5
5
  export declare function getTrellisTemplatePath(): string;
6
6
  /** @deprecated Use getTrellisTemplatePath() instead. */
@@ -6,7 +6,7 @@ import { replacePythonCommandLiterals } from "../configurators/shared.js";
6
6
  const __filename = fileURLToPath(import.meta.url);
7
7
  const __dirname = path.dirname(__filename);
8
8
  /**
9
- * Get the path to the trellis templates directory (.trellis/ scaffolding).
9
+ * Get the path to the trellis templates directory (.cstl/ scaffolding).
10
10
  */
11
11
  export function getTrellisTemplatePath() {
12
12
  const templatePath = path.join(__dirname, "trellis");
@@ -1,28 +1,28 @@
1
- <!-- TRELLIS:START -->
2
- # Trellis Instructions
1
+ <!-- CSTL:START -->
2
+ # Cursor-Trellis (cstl) Instructions
3
3
 
4
4
  These instructions are for AI assistants working in this project.
5
5
 
6
- This project is managed by Trellis. The working knowledge you need lives under `.trellis/`:
6
+ This project is managed by cursor-trellis. The working knowledge you need lives under `.cstl/`:
7
7
 
8
- - `.trellis/workflow.md` — development phases, when to create tasks, skill routing
9
- - `.trellis/spec/` — package- and layer-scoped coding guidelines (read before writing code in a given layer)
10
- - `.trellis/workspace/` — per-developer journals and session traces
11
- - `.trellis/tasks/` — active and archived tasks (PRDs, research, jsonl context)
8
+ - `.cstl/workflow.md` — development phases, when to create tasks, skill routing
9
+ - `.cstl/spec/` — package- and layer-scoped coding guidelines (read before writing code in a given layer)
10
+ - `.cstl/workspace/` — per-developer journals and session traces
11
+ - `.cstl/tasks/` — active and archived tasks (PRDs, research, jsonl context)
12
12
 
13
- If a Trellis command is available on Cursor (e.g. `/trellis:finish-work`, `/trellis:continue`), prefer it over manual steps.
13
+ If a cstl command is available on Cursor (e.g. `cstl-finish-work`, `cstl-continue`), prefer it over manual steps.
14
14
 
15
15
  ## Command surface (what is user-invocable vs internal)
16
16
 
17
17
  Only a handful of Trellis entry points are meant for **manual `/` invocation**. Everything else is an **internal auto-triggered skill** — the agent loads it via the skill matcher or workflow routing, not by being called directly. Do **not** manually invoke internal skills through the slash palette.
18
18
 
19
- - **User-invocable (manual)**: `/trellis-continue`, `/trellis-finish-work` (and `/trellis-start` when needed).
20
- - **Internal auto-triggered (do NOT call manually)**: `trellis-brainstorm`, `trellis-before-dev`, `trellis-check`, `trellis-break-loop`, `trellis-update-spec`, `trellis-micro-grill`, `trellis-meta`, `trellis-spec-bootstrap`, `trellis-skill-creator`, `smart-search-cli`. These activate on their own when the workflow/skill matcher decides they fit.
19
+ - **User-invocable (manual)**: `cstl-continue`, `cstl-finish-work` (and `cstl-start` when needed).
20
+ - **Internal auto-triggered (do NOT call manually)**: `cstl-brainstorm`, `cstl-before-dev`, `cstl-check`, `cstl-break-loop`, `cstl-update-spec`, `cstl-micro-grill`, `cstl-meta`, `cstl-spec-bootstrap`, `cstl-skill-creator`, `smart-search-cli`. These activate on their own when the workflow/skill matcher decides they fit.
21
21
 
22
22
  ## Web research routing (smart-search first)
23
23
 
24
- For **any external / current / web fact**, run **`python ./.trellis/scripts/run_smart_search.py "<question>" --intent deep-research --json`** first. That script is the **only** Trellis web-research evidence entrypoint (it shells out to the `smart-search` CLI). Do not guess paths under package source trees or sibling repos. Platform built-in web tools (Cursor `WebSearch` / `WebFetch`, or native web tools elsewhere) are **downgrade-only fallbacks**, used solely when smart-search is unavailable (`doctor` not ok, status `not_configured` / `failed`, or search timeout). Do not reach for built-in web search while smart-search is healthy. On Cursor, `smart-search-cli` is an **internal workflow skill name** only (not shipped under `.cursor/skills/`); follow `.trellis/spec/guides/retrieval-daily-guide.md` and `.cursor/rules/retrieval-routing.mdc` for the executable contract.
24
+ For **any external / current / web fact**, run **`python ./.cstl/scripts/run_smart_search.py "<question>" --intent deep-research --json`** first. That script is the **only** Trellis web-research evidence entrypoint (it shells out to the `smart-search` CLI). Do not guess paths under package source trees or sibling repos. Platform built-in web tools (Cursor `WebSearch` / `WebFetch`, or native web tools elsewhere) are **downgrade-only fallbacks**, used solely when smart-search is unavailable (`doctor` not ok, status `not_configured` / `failed`, or search timeout). Do not reach for built-in web search while smart-search is healthy. On Cursor, `smart-search-cli` is an **internal workflow skill name** only (not shipped under `.cursor/skills/`); follow `.cstl/spec/guides/retrieval-daily-guide.md` and `.cursor/rules/retrieval-routing.mdc` for the executable contract.
25
25
 
26
- Managed by Trellis. Edits outside this block are preserved; edits inside may be overwritten by a future `trellis update`.
26
+ Managed by cursor-trellis. Edits outside this block are preserved; edits inside may be overwritten by a future `cstl update`.
27
27
 
28
- <!-- TRELLIS:END -->
28
+ <!-- CSTL:END -->
@@ -7,7 +7,7 @@
7
7
  For each query in `queries-semantic-slice.jsonl`:
8
8
 
9
9
  ```powershell
10
- python .trellis/scripts/route_codebase_retrieval.py "<question>" --json
10
+ python .cstl/scripts/route_codebase_retrieval.py "<question>" --json
11
11
  ```
12
12
 
13
13
  Record `semantic_in_plan` / route list from the envelope.