@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,165 +1,189 @@
1
- # Trellis Brainstorm
2
-
3
- ## Non-Negotiable Interview Contract
4
-
5
- Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
6
-
7
- Ask the questions one at a time.
8
-
9
- ## Non-Negotiable Evidence Rule
10
-
11
- If a question can be answered by exploring the codebase, explore the codebase instead.
12
-
13
- This is mandatory. Before asking the user a question, first check whether the answer is already available in code, tests, configs, docs, existing specs, or task history.
14
-
15
- Do not ask the user to confirm facts that the repository can answer. Ask only for product intent, preference, scope, risk tolerance, or decisions that remain ambiguous after inspection.
16
-
17
- ---
18
-
19
- Use this skill during Phase 1 planning to turn the user's request into clear requirements and planning artifacts.
20
-
21
- **Agent-capable platforms:** Do **not** use legacy Claude-only grill subagents as a hard gate. Complete **PRD Grill** (below) and **`trellis-micro-grill`** for blocking open questions before treating planning as ready for `design.md` / `implement.md` / `start-execution --check`.
22
-
23
- ## Preconditions
24
-
25
- Use this skill only after task-creation consent has been given and the user is ready to enter Trellis planning.
26
-
27
- If no task exists yet, create one:
28
-
29
- ```bash
30
- TASK_DIR=$(python ./.trellis/scripts/task.py create "<short task title>" --slug <slug>)
31
- ```
32
-
33
- Use a concise title from the user's request. Use a slug without a date prefix. `task.py create` adds the `MM-DD-` directory prefix automatically.
34
-
35
- `task.py create` creates the default `prd.md`. Update that file with the current understanding before asking follow-up questions.
36
-
37
- ## Two-phase planning overview
38
-
39
- | Phase | Name | User questions |
40
- | --- | --- | --- |
41
- | **A** | Discovery Before Questions + PRD draft | None until repo evidence is exhausted |
42
- | **B** | PRD Grill pass + Micro-grill unresolved | Only blocking business / risk / preference |
43
-
44
- External facts during Discovery or Research: load `smart-search-cli`; on CLI/doctor failure use Cursor WebSearch/WebFetch and persist under `{TASK}/research/` with `source: cursor-web-fallback`.
45
-
46
- ---
47
-
48
- ## Phase A — Discovery Before Questions
49
-
50
- Run **before** any user interview questions.
51
-
52
- Inspect and record in `prd.md` (sections: **Confirmed facts**, initial **Out of scope**, draft **Goal**):
53
-
54
- 1. **Code & tests** — relevant modules, fixtures, configs, error paths.
55
- 2. **Specs** `.trellis/spec/` indexes and layer guides for touched packages.
56
- 3. **History** — archived tasks, active task research, developer journal when useful.
57
- 4. **Platform** — project platform hooks, agents, and skills (see `.trellis/spec/guides/cursor-subagent-policy.md` when using Cursor); shared `.agents/skills/` when behavior spans platforms.
58
- 5. **Parent/Child** — if multiple independent deliverables, note child split early in `prd.md`.
59
-
60
- Use retrieval per `.trellis/spec/guides/retrieval-daily-guide.md` (rg for literals, codegraph for structure, fast-context for semantic sweep).
61
-
62
- Dispatch **`trellis-research`** (writable Agent) when a topic needs a dedicated `{TASK}/research/<topic>.md` file; do **not** use a subagent for PRD Grill itself.
63
-
64
- ## Phase A PRD draft
65
-
66
- After Discovery, flesh out `prd.md`:
67
-
68
- - goal and user value
69
- - confirmed facts (not restated as unverified requirements)
70
- - requirements
71
- - draft acceptance criteria
72
- - out of scope
73
- - open questions (tag **blocking** vs **nice-to-have**)
74
-
75
- For complex tasks, start `design.md` / `implement.md` skeletons only when boundaries are already clear from Discovery; otherwise wait until Phase B.
76
-
77
- ## Phase B PRD Grill pass
78
-
79
- Treat `prd.md` (+ existing `design.md` fragments) as the **only document surface**. Run this checklist; fix the PRD in place (no new subagent):
80
-
81
- | # | Check |
82
- | --- | --- |
83
- | 1 | **Goal & user value** — single clear statement |
84
- | 2 | **Confirmed facts vs assumptions** repo facts not listed as assumptions |
85
- | 3 | **Testable acceptance criteria** |
86
- | 4 | **Out of scope** explicit |
87
- | 5 | **Dependencies & sequencing** |
88
- | 6 | **Parent/Child & deliverables** when applicable |
89
- | 7 | **Research & external facts** smart-search or documented fallback |
90
- | 8 | **Execution gate & artifacts** — `design.md` / `implement.md` / `verify.md` expectations |
91
- | 9 | **Durable Learning** — Phase 3.3 will need `update-spec` \| `no-update` \| `unsure` |
92
- | 10 | **Platform** — Cursor-first; PRD Grill in-session (no legacy grill-me / grill-with-docs subagent gate) |
93
- | 11 | **Risk & rollback** for complex tasks |
94
- | 12 | **Open questions** — only **blocking** strategic/preference items remain |
95
-
96
- ## Phase B — Micro-grill unresolved
97
-
98
- For each **blocking** open question after the checklist, embed the **`trellis-micro-grill` contract**:
99
-
100
- - exactly **one** question per message
101
- - **Simplified Chinese** for user-facing text
102
- - recommended answer + trade-off
103
- - **update `prd.md` after every answer** before the next question
104
-
105
- Stop micro-grill when no blocking open questions remain.
106
-
107
- Do not ask process questions ("should I search?"). Do not re-ask facts Discovery already confirmed.
108
-
109
- ## Question Rules (Phase B only)
110
-
111
- Each question must include:
112
-
113
- - the decision needed
114
- - why the answer matters
115
- - your recommended answer
116
- - the trade-off if the user chooses differently
117
-
118
- ## Artifact Rules
119
-
120
- `prd.md` records requirements and acceptance:
121
-
122
- - goal and user value
123
- - confirmed facts
124
- - requirements
125
- - acceptance criteria
126
- - out of scope
127
- - open questions that still block planning
128
-
129
- `design.md` records technical design for complex tasks:
130
-
131
- - architecture and boundaries
132
- - data flow and contracts
133
- - compatibility and migration notes
134
- - important trade-offs
135
- - operational or rollback considerations
136
-
137
- `implement.md` records execution planning for complex tasks:
138
-
139
- - ordered implementation checklist
140
- - validation commands
141
- - risky files or rollback points
142
- - **Development Strategy Contract** (`execution_mode`, `isolation`, …): before finalizing, run `python3 ./.trellis/scripts/task.py suggest-execution-strategy <task-dir>` (or `--json`); reconcile suggestion with scope, then paste the approved YAML block into `implement.md`
143
- - follow-up checks before `task.py start-execution --check`
144
-
145
- Lightweight tasks may have only `prd.md`. Complex tasks must have `prd.md`, `design.md`, and `implement.md` before `task.py start-execution --check`.
146
-
147
- `implement.md` is not a replacement for `implement.jsonl`. Use JSONL files only for manifest-style spec and research references when the task needs them.
148
-
149
- ## Completion criteria — PRD Grill done
150
-
151
- Planning is ready for execution gate when **all** hold:
152
-
153
- - PRD Grill checklist (12 items) satisfied or explicitly N/A with rationale in `prd.md`
154
- - **No blocking** open questions in `prd.md`
155
- - Acceptance criteria are testable; out of scope is explicit
156
- - Complex tasks: `design.md` and `implement.md` present
157
- - User reviewed artifacts or explicitly approved proceeding
158
-
159
- Then proceed to Phase 1.2 Research (if needed), Phase 1.4 `task.py start-execution --check`, and implementation only after user approval.
160
-
161
- Do not start implementation until the user approves or asks for implementation.
162
-
163
- ## Legacy planning flow (summary)
164
-
1
+ # Trellis Brainstorm
2
+
3
+ ## Non-Negotiable Interview Contract
4
+
5
+ Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
6
+
7
+ Ask the questions one at a time.
8
+
9
+ ## Non-Negotiable Evidence Rule
10
+
11
+ If a question can be answered by exploring the codebase, explore the codebase instead.
12
+
13
+ This is mandatory. Before asking the user a question, first check whether the answer is already available in code, tests, configs, docs, existing specs, or task history.
14
+
15
+ Do not ask the user to confirm facts that the repository can answer. Ask only for product intent, preference, scope, risk tolerance, or decisions that remain ambiguous after inspection.
16
+
17
+ ## Thinking Principles
18
+
19
+ These two principles shape *how* you grill, not just *what* you ask. Apply them throughout Phase A and B.
20
+
21
+ ### First Principles
22
+
23
+ Reason from irreducible facts and user value, not from analogy to existing solutions or "how it's always been done".
24
+
25
+ - When you encounter a requirement phrased as "we need X like Y has", separate the **root need** (the user value behind X) from the **inherited assumption** (Y's specific shape).
26
+ - For every "because that's the convention" justification, ask: what problem did that convention solve, and does that problem actually exist here?
27
+ - Trace each requirement back to a user-facing outcome. If no outcome survives, the requirement is inherited, not fundamental — flag it as a candidate for Out of Scope.
28
+
29
+ ### Occam's Razor
30
+
31
+ Among competing designs that satisfy the acceptance criteria, prefer the one with the fewest additional assumptions.
32
+
33
+ - Default recommendation = the **minimal sufficient** design. Complexity must be justified by evidence (a contract, an edge case, a verified constraint), not added speculatively "for later".
34
+ - Actively strip scope that exists only to satisfy an assumption you cannot verify from repo evidence.
35
+ - When two paths are equally sufficient, the simpler one wins; the burden of proof is on the more complex path.
36
+
37
+ ---
38
+
39
+ Use this skill during Phase 1 planning to turn the user's request into clear requirements and planning artifacts.
40
+
41
+ **Agent-capable platforms:** Do **not** use legacy Claude-only grill subagents as a hard gate. Complete **PRD Grill** (below) and **`cstl-micro-grill`** for blocking open questions before treating planning as ready for `design.md` / `implement.md` / `start-execution --check`.
42
+
43
+ ## Preconditions
44
+
45
+ Use this skill only after task-creation consent has been given and the user is ready to enter Trellis planning.
46
+
47
+ If no task exists yet, create one:
48
+
49
+ ```bash
50
+ TASK_DIR=$(python ./.cstl/scripts/task.py create "<short task title>" --slug <slug>)
51
+ ```
52
+
53
+ Use a concise title from the user's request. Use a slug without a date prefix. `task.py create` adds the `MM-DD-` directory prefix automatically.
54
+
55
+ `task.py create` creates the default `prd.md`. Update that file with the current understanding before asking follow-up questions.
56
+
57
+ ## Two-phase planning overview
58
+
59
+ | Phase | Name | User questions |
60
+ | --- | --- | --- |
61
+ | **A** | Discovery Before Questions + PRD draft | None until repo evidence is exhausted |
62
+ | **B** | PRD Grill pass + Micro-grill unresolved | Only blocking business / risk / preference |
63
+
64
+ External facts during Discovery or Research: load `smart-search-cli`; on CLI/doctor failure use Cursor WebSearch/WebFetch and persist under `{TASK}/research/` with `source: cursor-web-fallback`.
65
+
66
+ ---
67
+
68
+ ## Phase A Discovery Before Questions
69
+
70
+ Run **before** any user interview questions.
71
+
72
+ Inspect and record in `prd.md` (sections: **Confirmed facts**, initial **Out of scope**, draft **Goal**):
73
+
74
+ 1. **Code & tests** — relevant modules, fixtures, configs, error paths.
75
+ 2. **Specs** `.cstl/spec/` indexes and layer guides for touched packages.
76
+ 3. **History** — archived tasks, active task research, developer journal when useful.
77
+ 4. **Platform**project platform hooks, agents, and skills (see `.cstl/spec/guides/cursor-subagent-policy.md` when using Cursor); shared `.agents/skills/` when behavior spans platforms.
78
+ 5. **Parent/Child** — if multiple independent deliverables, note child split early in `prd.md`.
79
+
80
+ Use retrieval per `.cstl/spec/guides/retrieval-daily-guide.md` (rg for literals, codegraph for structure, fast-context for semantic sweep).
81
+
82
+ Dispatch **`cstl-research`** (writable Agent) when a topic needs a dedicated `{TASK}/research/<topic>.md` file; do **not** use a subagent for PRD Grill itself.
83
+
84
+ ## Phase APRD draft
85
+
86
+ After Discovery, flesh out `prd.md`:
87
+
88
+ - goal and user value
89
+ - confirmed facts (not restated as unverified requirements)
90
+ - requirements
91
+ - draft acceptance criteria
92
+ - out of scope
93
+ - open questions (tag **blocking** vs **nice-to-have**)
94
+
95
+ For complex tasks, start `design.md` / `implement.md` skeletons only when boundaries are already clear from Discovery; otherwise wait until Phase B.
96
+
97
+ ## Phase B — PRD Grill pass
98
+
99
+ Treat `prd.md` (+ existing `design.md` fragments) as the **only document surface**. Run this checklist; fix the PRD in place (no new subagent):
100
+
101
+ | # | Check |
102
+ | --- | --- |
103
+ | 1 | **Goal & user value** single clear statement |
104
+ | 2 | **Confirmed facts vs assumptions** — repo facts not listed as assumptions |
105
+ | 3 | **Testable acceptance criteria** |
106
+ | 4 | **Out of scope** explicit |
107
+ | 5 | **Dependencies & sequencing** |
108
+ | 6 | **Parent/Child & deliverables** when applicable |
109
+ | 7 | **Research & external facts** — smart-search or documented fallback |
110
+ | 8 | **Execution gate & artifacts** — `design.md` / `implement.md` / `verify.md` expectations |
111
+ | 9 | **Durable Learning** — Phase 3.3 will need `update-spec` \| `no-update` \| `unsure` |
112
+ | 10 | **Platform** — Cursor-first; PRD Grill in-session (no legacy grill-me / grill-with-docs subagent gate) |
113
+ | 11 | **Risk & rollback** for complex tasks |
114
+ | 12 | **Open questions** — only **blocking** strategic/preference items remain |
115
+ | 13 | **Root vs inherited assumptions** — every requirement traces to a user-facing root need; inherited assumptions (convention, analogy, "we've always done it") are flagged or removed (First Principles) |
116
+ | 14 | **Minimal sufficient design** — no scope, layer, or mechanism exists to satisfy an unverified assumption; the simplest design that meets acceptance wins (Occam's Razor) |
117
+
118
+ ## Phase B — Micro-grill unresolved
119
+
120
+ For each **blocking** open question after the checklist, embed the **`cstl-micro-grill` contract**:
121
+
122
+ - exactly **one** question per message
123
+ - **Simplified Chinese** for user-facing text
124
+ - recommended answer + trade-off
125
+ - **update `prd.md` after every answer** before the next question
126
+
127
+ Stop micro-grill when no blocking open questions remain.
128
+
129
+ Do not ask process questions ("should I search?"). Do not re-ask facts Discovery already confirmed.
130
+
131
+ ## Question Rules (Phase B only)
132
+
133
+ Each question must include:
134
+
135
+ - the decision needed
136
+ - why the answer matters
137
+ - your recommended answer
138
+ - the trade-off if the user chooses differently
139
+
140
+ Your recommended answer defaults to Occam's Razor: the **minimal sufficient** option that still satisfies the acceptance criteria. Only recommend a more complex option when you can cite evidence (a contract, a verified edge case, a repo constraint) that the simpler option violates.
141
+
142
+ ## Artifact Rules
143
+
144
+ `prd.md` records requirements and acceptance:
145
+
146
+ - goal and user value
147
+ - confirmed facts
148
+ - requirements
149
+ - acceptance criteria
150
+ - out of scope
151
+ - open questions that still block planning
152
+
153
+ `design.md` records technical design for complex tasks:
154
+
155
+ - architecture and boundaries
156
+ - data flow and contracts
157
+ - compatibility and migration notes
158
+ - important trade-offs
159
+ - operational or rollback considerations
160
+
161
+ `implement.md` records execution planning for complex tasks:
162
+
163
+ - ordered implementation checklist
164
+ - validation commands
165
+ - risky files or rollback points
166
+ - **Development Strategy Contract** (`execution_mode`, `isolation`, …): before finalizing, run `python3 ./.cstl/scripts/task.py suggest-execution-strategy <task-dir>` (or `--json`); reconcile suggestion with scope, then paste the approved YAML block into `implement.md`
167
+ - follow-up checks before `task.py start-execution --check`
168
+
169
+ Lightweight tasks may have only `prd.md`. Complex tasks must have `prd.md`, `design.md`, and `implement.md` before `task.py start-execution --check`.
170
+
171
+ `implement.md` is not a replacement for `implement.jsonl`. Use JSONL files only for manifest-style spec and research references when the task needs them.
172
+
173
+ ## Completion criteria — PRD Grill done
174
+
175
+ Planning is ready for execution gate when **all** hold:
176
+
177
+ - PRD Grill checklist (14 items) satisfied or explicitly N/A with rationale in `prd.md`
178
+ - **No blocking** open questions in `prd.md`
179
+ - Acceptance criteria are testable; out of scope is explicit
180
+ - Complex tasks: `design.md` and `implement.md` present
181
+ - User reviewed artifacts or explicitly approved proceeding
182
+
183
+ Then proceed to Phase 1.2 Research (if needed), Phase 1.4 `task.py start-execution --check`, and implementation only after user approval.
184
+
185
+ Do not start implementation until the user approves or asks for implementation.
186
+
187
+ ## Legacy planning flow (summary)
188
+
165
189
  The former single "Planning Flow" is now Phase A + B above. Steps 4–6 map to Phase B micro-grill and artifact updates.
@@ -55,8 +55,8 @@ What broader problems does this bug reveal?
55
55
 
56
56
  Solidify insights into the system:
57
57
 
58
- - [ ] Update `.trellis/spec/guides/` thinking guides
59
- - [ ] Update relevant `.trellis/spec/` docs
58
+ - [ ] Update `.cstl/spec/guides/` thinking guides
59
+ - [ ] Update relevant `.cstl/spec/` docs
60
60
  - [ ] Create issue record (if applicable)
61
61
  - [ ] Create feature ticket for root fix
62
62
  - [ ] Update check guidelines if needed
@@ -118,7 +118,7 @@ Three levels of insight:
118
118
  - If it's a code reuse issue → update `code-reuse-thinking-guide.md`
119
119
  - If it's domain-specific → update `backend/*.md` or `frontend/*.md`
120
120
 
121
- 2. **Sync templates** - After updating `.trellis/spec/`, sync to `src/templates/markdown/spec/`
121
+ 2. **Sync templates** - After updating `.cstl/spec/`, sync to `src/templates/markdown/spec/`
122
122
 
123
123
  3. **Commit the spec updates** - This is the primary output, not just the analysis text
124
124
 
@@ -20,13 +20,13 @@ Read the selected task artifacts in order:
20
20
  - `implement.md` if present
21
21
 
22
22
  ```bash
23
- python ./.trellis/scripts/get_context.py --mode packages
23
+ python ./.cstl/scripts/get_context.py --mode packages
24
24
  ```
25
25
 
26
26
  For each changed package/layer, read the spec index and follow its **Quality Check** section:
27
27
 
28
28
  ```bash
29
- cat .trellis/spec/<package>/<layer>/index.md
29
+ cat .cstl/spec/<package>/<layer>/index.md
30
30
  ```
31
31
 
32
32
  Read the specific guideline files referenced — the index is a pointer, not the goal.
@@ -56,12 +56,12 @@ Run the project's lint, type-check, and test commands. Fix any failures before p
56
56
  - [ ] `verify.md` contains exactly one token: `Learning decision: update-spec` | `no-update` | `unsure`
57
57
  - [ ] If `update-spec` or `unsure`: `research/learning-proposal.md` exists (or documented `N/A` with reason) and matches the decision
58
58
  - [ ] If `no-update`: includes `no durable learning` (or guide-equivalent) plus brief rationale
59
- - [ ] If `update-spec`: spec was written only after confirmation; `Spec update evidence:` points at `.trellis/spec/...`
60
- - [ ] No silent edits to `.trellis/spec/` without confirmation
59
+ - [ ] If `update-spec`: spec was written only after confirmation; `Spec update evidence:` points at `.cstl/spec/...`
60
+ - [ ] No silent edits to `.cstl/spec/` without confirmation
61
61
 
62
62
  ### Spec Sync
63
63
 
64
- - [ ] Does `.trellis/spec/` need updates? (route through semi-automatic flow: proposal → confirm → `trellis-update-spec`)
64
+ - [ ] Does `.cstl/spec/` need updates? (route through semi-automatic flow: proposal → confirm → `cstl-update-spec`)
65
65
 
66
66
  > "If I fixed a bug or discovered something non-obvious, should I document it so future me won't hit the same issue?" → If YES, update the relevant spec doc.
67
67
 
@@ -9,9 +9,9 @@ When you learn something valuable (from debugging, implementing, or discussion),
9
9
  ## Semi-automatic flow (required for durable learning)
10
10
 
11
11
  1. **Detect** — did this task produce reusable code-spec or guide-worthy learning?
12
- 2. **Proposal** — write `{TASK}/research/learning-proposal.md` (target spec paths, draft bullets; **do not** edit `.trellis/spec/` yet).
12
+ 2. **Proposal** — write `{TASK}/research/learning-proposal.md` (target spec paths, draft bullets; **do not** edit `.cstl/spec/` yet).
13
13
  3. **Confirm** — user or task owner explicitly approves (`Learning decision: update-spec` in `verify.md`).
14
- 4. **Write** — only then edit spec files; add `Spec update evidence: .trellis/spec/...` to `verify.md`.
14
+ 4. **Write** — only then edit spec files; add `Spec update evidence: .cstl/spec/...` to `verify.md`.
15
15
 
16
16
  **Forbidden:** silent spec edits; writing spec when `Learning decision: no-update` or `unsure` without follow-up; auto-updating spec from hooks or check alone.
17
17
 
@@ -68,7 +68,7 @@ For triggered tasks, include all sections below:
68
68
  ## Spec Structure Overview
69
69
 
70
70
  ```
71
- .trellis/spec/
71
+ .cstl/spec/
72
72
  ├── <layer>/ # Per-layer coding standards (e.g., backend/, frontend/, api/)
73
73
  │ ├── index.md # Overview and links
74
74
  │ └── *.md # Topic-specific guidelines
@@ -130,7 +130,7 @@ Before editing, read the current code-spec to:
130
130
  - Find the right section for your update
131
131
 
132
132
  ```bash
133
- cat .trellis/spec/<category>/<file>.md
133
+ cat .cstl/spec/<category>/<file>.md
134
134
  ```
135
135
 
136
136
  ### Step 4: Make the Update
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: trellis-check
2
+ name: cstl-check
3
3
  description: Trellis quality check agent. Use this exact agent for Trellis task verification, check.jsonl context injection, and self-fixing code review. Do not use generic/default/generalPurpose agents for Trellis checks.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
5
5
  ---
@@ -7,11 +7,11 @@ tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__
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 check` → pass stdout as `Task(..., prompt=...)` — context from the Layer 2 prompt.
10
+ - **Task dispatch:** Run `python ./.cstl/scripts/generate_dispatch_prompt.py --agent check` → 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-check)`.
14
+ - **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(cstl-check)`.
15
15
  - **Hook `additional_context` = best-effort only** — Cursor #158452: not guaranteed to reach the model; optimization / fallback only.
16
16
 
17
17
  # Check Agent
@@ -21,19 +21,19 @@ You are the Check Agent in the Trellis workflow.
21
21
  ## Model policy
22
22
 
23
23
  - **Default:** no `model:` → **inherit** parent session.
24
- - **Per dispatch:** main session asks user → one-shot `model:` overlay → `Task` → restore (architecture review uses the same flow). See `.trellis/spec/guides/cursor-subagent-policy.md`.
24
+ - **Per dispatch:** main session asks user → one-shot `model:` overlay → `Task` → restore (architecture review uses the same flow). See `.cstl/spec/guides/cursor-subagent-policy.md`.
25
25
 
26
26
  ## Recursion Guard
27
27
 
28
- You are already the `trellis-check` sub-agent that the main session dispatched. Do the review and fixes directly.
28
+ You are already the `cstl-check` sub-agent that the main session dispatched. Do the review and fixes directly.
29
29
 
30
- - Do NOT spawn another `trellis-check` or `trellis-implement` sub-agent.
31
- - If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `trellis-implement` / `trellis-check`, treat that as a main-session instruction that is already satisfied by your current role.
30
+ - Do NOT spawn another `cstl-check` or `cstl-implement` sub-agent.
31
+ - If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `cstl-implement` / `cstl-check`, treat that as a main-session instruction that is already satisfied by your current role.
32
32
  - Only the main session may dispatch Trellis implement/check agents. If more implementation work is needed, report that recommendation instead of spawning.
33
33
 
34
34
  ## Trellis Context Loading Protocol
35
35
 
36
- Look for the `<!-- trellis-hook-injected -->` marker in your input above.
36
+ Look for the `<!-- cstl-hook-injected -->` marker in your input above.
37
37
 
38
38
  - **If the marker is present**: task artifacts, spec, and research files have already been auto-loaded for you above. Proceed with the check work directly.
39
39
  - **If the marker is absent**: hook injection didn't fire (Windows + Claude Code, `--continue` resume, fork distribution, hooks disabled, etc.). Find the selected task path from your dispatch prompt's first line `Selected task: <path>`, then Read `<task-path>/check.jsonl`, each listed file, `<task-path>/prd.md`, `<task-path>/design.md` if present, and `<task-path>/implement.md` if present before doing the work.
@@ -41,13 +41,13 @@ Look for the `<!-- trellis-hook-injected -->` marker in your input above.
41
41
  ## Dispatch contract (Parent / inline)
42
42
 
43
43
  - Only the **main session or Parent** dispatches this agent; Child workers must not re-spawn Trellis sub-agents.
44
- - **Inline** (`in_progress-inline`): main session uses the `trellis-check` **skill** instead of spawning this agent unless a dedicated review pass is needed.
45
- - Align with the `trellis-check` skill: `get_context.py --mode packages`, spec indexes, cross-layer checks; you may fix issues and record gates — do not redefine Parent `task-map` or gate semantics.
44
+ - **Inline** (`in_progress-inline`): main session uses the `cstl-check` **skill** instead of spawning this agent unless a dedicated review pass is needed.
45
+ - Align with the `cstl-check` skill: `get_context.py --mode packages`, spec indexes, cross-layer checks; you may fix issues and record gates — do not redefine Parent `task-map` or gate semantics.
46
46
 
47
47
  ## Context
48
48
 
49
49
  Before checking, read:
50
- - `.trellis/spec/` - Development guidelines
50
+ - `.cstl/spec/` - Development guidelines
51
51
  - Task `prd.md` - Requirements document
52
52
  - Task `design.md` - Technical design (if exists)
53
53
  - Task `implement.md` - Execution plan (if exists)
@@ -65,7 +65,7 @@ Before checking, read:
65
65
 
66
66
  - Reviewer id: `cursor`.
67
67
  - When `implement.md` quality_gates requires a reviewer gate for the current transition, write human-readable evidence in `verify.md` before recording the machine-checkable gate result. Parent/Child integration evidence may also belong in Parent `task-map.md`.
68
- - Record non-baseline gates with `python ./.trellis/scripts/task.py record-gate <task> --transition <transition> --gate <gate> --result PASS --reviewer cursor --evidence verify.md`.
68
+ - Record non-baseline gates with `python ./.cstl/scripts/task.py record-gate <task> --transition <transition> --gate <gate> --result PASS --reviewer cursor --evidence verify.md`.
69
69
  - For FAIL, add `--root-cause implementation-defect|contract-changing-defect|validation-environment-blocker` and `--issue-fingerprint <short-stable-id>`. Route implementation defects back to Execution, contract-changing defects to Planning, and validation blockers to Verification / Review.
70
70
  - For SKIPPED, use only explicit user approval: `--skip-approved-by user --skip-reason <reason>`.
71
71
  - Never record `baseline-check`; the CLI owns it. Do not pass review bodies, logs, screenshots, or long issue lists through `record-gate` arguments.
@@ -89,7 +89,7 @@ git diff # View specific changes
89
89
 
90
90
  ### Step 2: Check Against Specs and Task Artifacts
91
91
 
92
- Read the task's prd.md, design.md if present, and implement.md if present, then read relevant specs in `.trellis/spec/` to check code:
92
+ Read the task's prd.md, design.md if present, and implement.md if present, then read relevant specs in `.cstl/spec/` to check code:
93
93
 
94
94
  - Does it satisfy the task requirements
95
95
  - Does it follow the technical design and implementation plan when present
@@ -124,7 +124,7 @@ When the pack exists:
124
124
 
125
125
  ```bash
126
126
  # Optional: confirm path from selected task
127
- python ./.trellis/scripts/task.py selected --source
127
+ python ./.cstl/scripts/task.py selected --source
128
128
  ```
129
129
 
130
130
  Read `{TASK}/research/retrieval-pack-latest.json` and use `contextPack.selected` (top items: `title`, `source`, `reference`, `score`). Add or update `verify.md` with:
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: trellis-implement
2
+ name: cstl-implement
3
3
  description: Trellis implementation agent. Use this exact agent for Trellis task implementation, implement.jsonl context injection, and hook-injection tests. Do not use generic/default/generalPurpose agents for Trellis implementation. No git commit allowed.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
5
5
  ---
@@ -7,11 +7,11 @@ tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__
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 implement` → pass stdout as `Task(..., prompt=...)` — context from the Layer 2 prompt.
10
+ - **Task dispatch:** Run `python ./.cstl/scripts/generate_dispatch_prompt.py --agent implement` → 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-implement)`.
14
+ - **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(cstl-implement)`.
15
15
  - **Hook `additional_context` = best-effort only** — Cursor #158452: not guaranteed to reach the model; optimization / fallback only.
16
16
 
17
17
  # Implement Agent
@@ -21,19 +21,19 @@ You are the Implement Agent in the Trellis workflow.
21
21
  ## Model policy
22
22
 
23
23
  - **Default:** no `model:` → **inherit** parent session.
24
- - **Per dispatch / Child worker:** main session asks user → one-shot `model:` overlay on this file → `Task` → restore. Child session uses the same overlay pattern on `trellis-implement`. See `.trellis/spec/guides/cursor-subagent-policy.md`.
24
+ - **Per dispatch / Child worker:** main session asks user → one-shot `model:` overlay on this file → `Task` → restore. Child session uses the same overlay pattern on `cstl-implement`. See `.cstl/spec/guides/cursor-subagent-policy.md`.
25
25
 
26
26
  ## Recursion Guard
27
27
 
28
- You are already the `trellis-implement` sub-agent that the main session dispatched. Do the implementation work directly.
28
+ You are already the `cstl-implement` sub-agent that the main session dispatched. Do the implementation work directly.
29
29
 
30
- - Do NOT spawn another `trellis-implement` or `trellis-check` sub-agent.
31
- - If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `trellis-implement` / `trellis-check`, treat that as a main-session instruction that is already satisfied by your current role.
30
+ - Do NOT spawn another `cstl-implement` or `cstl-check` sub-agent.
31
+ - If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `cstl-implement` / `cstl-check`, treat that as a main-session instruction that is already satisfied by your current role.
32
32
  - Only the main session may dispatch Trellis implement/check agents. If more parallel work is needed, report that recommendation instead of spawning.
33
33
 
34
34
  ## Trellis Context Loading Protocol
35
35
 
36
- Look for the `<!-- trellis-hook-injected -->` marker in your input above.
36
+ Look for the `<!-- cstl-hook-injected -->` marker in your input above.
37
37
 
38
38
  - **If the marker is present**: prd / spec / research files have already been auto-loaded for you above. Proceed with the implementation work directly.
39
39
  - **If the marker is absent**: hook injection didn't fire (Windows + Claude Code, `--continue` resume, fork distribution, hooks disabled, `/multitask` parallel dispatch, etc.). Find the selected task path from your dispatch prompt's first line `Selected task: <path>`, then Read `<task-path>/implement.jsonl`, each listed file, `<task-path>/prd.md`, `<task-path>/design.md` if present, and `<task-path>/implement.md` if present before doing the work.
@@ -41,20 +41,20 @@ Look for the `<!-- trellis-hook-injected -->` marker in your input above.
41
41
  ## Dispatch contract (Parent / Child)
42
42
 
43
43
  - Parent or main session dispatches implement work; **Child tasks** deliver `verify.md` + `handoff.md` and must not change shared gate contracts.
44
- - Do not spawn nested `trellis-implement` / `trellis-check`; recommend a Parent review when check is needed.
44
+ - Do not spawn nested `cstl-implement` / `cstl-check`; recommend a Parent review when check is needed.
45
45
 
46
46
  ## Context
47
47
 
48
48
  Before implementing, read:
49
- - `.trellis/workflow.md` - Project workflow
50
- - `.trellis/spec/` - Development guidelines
49
+ - `.cstl/workflow.md` - Project workflow
50
+ - `.cstl/spec/` - Development guidelines
51
51
  - Task `prd.md` - Requirements document
52
52
  - Task `design.md` - Technical design (if exists)
53
53
  - Task `implement.md` - Execution plan (if exists)
54
54
 
55
55
  ## Core Responsibilities
56
56
 
57
- 1. **Understand specs** - Read relevant spec files in `.trellis/spec/`
57
+ 1. **Understand specs** - Read relevant spec files in `.cstl/spec/`
58
58
  2. **Understand task artifacts** - Read prd.md, design.md if present, and implement.md if present
59
59
  3. **Implement features** - Write code following specs and task artifacts
60
60
  4. **Self-check** - Ensure code quality
@@ -76,8 +76,8 @@ Before implementing, read:
76
76
 
77
77
  Read relevant specs based on task type:
78
78
 
79
- - Spec layers: `.trellis/spec/<package>/<layer>/`
80
- - Shared guides: `.trellis/spec/guides/`
79
+ - Spec layers: `.cstl/spec/<package>/<layer>/`
80
+ - Shared guides: `.cstl/spec/guides/`
81
81
 
82
82
  ### 2. Understand Requirements
83
83