@blxzer/cursor-trellis 0.2.9 → 0.3.0

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 (127) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +37 -12
  3. package/README.zh-CN.md +41 -16
  4. package/bin/{trellis.js → cstl.js} +1 -1
  5. package/dist/cli/index.d.ts.map +1 -1
  6. package/dist/cli/index.js +30 -4
  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/init.d.ts.map +1 -1
  13. package/dist/commands/init.js +94 -34
  14. package/dist/commands/init.js.map +1 -1
  15. package/dist/commands/uninstall.d.ts +1 -1
  16. package/dist/commands/uninstall.js +2 -2
  17. package/dist/commands/uninstall.js.map +1 -1
  18. package/dist/commands/update.d.ts +1 -1
  19. package/dist/commands/update.d.ts.map +1 -1
  20. package/dist/commands/update.js +79 -34
  21. package/dist/commands/update.js.map +1 -1
  22. package/dist/commands/upgrade.js +2 -2
  23. package/dist/commands/upgrade.js.map +1 -1
  24. package/dist/configurators/cursor.d.ts +2 -2
  25. package/dist/configurators/cursor.js +4 -4
  26. package/dist/configurators/cursor.js.map +1 -1
  27. package/dist/configurators/index.js +3 -3
  28. package/dist/configurators/index.js.map +1 -1
  29. package/dist/configurators/shared.d.ts +10 -10
  30. package/dist/configurators/shared.d.ts.map +1 -1
  31. package/dist/configurators/shared.js +26 -26
  32. package/dist/configurators/shared.js.map +1 -1
  33. package/dist/configurators/workflow.d.ts +2 -2
  34. package/dist/migrations/manifests/0.2.10.json +374 -0
  35. package/dist/migrations/manifests/0.3.0.json +89 -0
  36. package/dist/templates/common/bundled-skills/{trellis-cursor2plus-setup → cstl-cursor2plus-setup}/SKILL.md +5 -4
  37. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/SKILL.md +75 -75
  38. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/add-project-local-conventions.md +8 -8
  39. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-agents.md +6 -6
  40. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-context-loading.md +7 -7
  41. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-skills-or-commands.md +1 -1
  42. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-spec-structure.md +2 -2
  43. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-task-lifecycle.md +31 -31
  44. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-workflow.md +12 -12
  45. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/overview.md +55 -55
  46. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/context-injection.md +13 -13
  47. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/generated-files.md +83 -83
  48. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/overview.md +2 -2
  49. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/spec-system.md +1 -1
  50. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/task-system.md +22 -22
  51. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/workflow.md +5 -5
  52. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/workspace-memory.md +3 -3
  53. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/agents.md +11 -11
  54. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/hooks-and-settings.md +1 -1
  55. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/overview.md +4 -4
  56. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/platform-map.md +5 -5
  57. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/skills-and-commands.md +15 -15
  58. package/dist/templates/common/bundled-skills/{trellis-micro-grill → cstl-micro-grill}/SKILL.md +62 -47
  59. package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/SKILL.md +44 -44
  60. package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/references/authoring-rules.md +97 -97
  61. package/dist/templates/common/bundled-skills/{trellis-skill-creator/references/trellis-skill-locations.md → cstl-skill-creator/references/cstl-skill-locations.md} +52 -52
  62. package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/references/review-checklist.md +47 -47
  63. package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/SKILL.md +1 -1
  64. package/dist/templates/common/commands/continue.md +20 -20
  65. package/dist/templates/common/commands/start.md +11 -11
  66. package/dist/templates/common/index.d.ts +1 -1
  67. package/dist/templates/common/index.d.ts.map +1 -1
  68. package/dist/templates/common/skills/brainstorm.md +188 -164
  69. package/dist/templates/common/skills/check.md +1 -1
  70. package/dist/templates/cursor/agents/{trellis-check.md → cstl-check.md} +8 -8
  71. package/dist/templates/cursor/agents/{trellis-implement.md → cstl-implement.md} +8 -8
  72. package/dist/templates/cursor/agents/{trellis-research.md → cstl-research.md} +2 -2
  73. package/dist/templates/cursor/commands/cursor2plus-setup.md +5 -5
  74. package/dist/templates/cursor/fixtures/expected-rules.d.ts +1 -1
  75. package/dist/templates/cursor/fixtures/expected-rules.d.ts.map +1 -1
  76. package/dist/templates/cursor/fixtures/expected-rules.js +2 -2
  77. package/dist/templates/cursor/fixtures/expected-rules.js.map +1 -1
  78. package/dist/templates/cursor/rules/{trellis-subagent-dispatch.mdc → cstl-subagent-dispatch.mdc} +2 -2
  79. package/dist/templates/cursor/rules/{trellis-triage.mdc → cstl-triage.mdc} +1 -1
  80. package/dist/templates/markdown/agents.md +4 -4
  81. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +634 -634
  82. package/dist/templates/markdown/spec/guides/cursor-context-injection-guide.md.txt +4 -4
  83. package/dist/templates/markdown/spec/guides/cursor-semantic-compliance.md.txt +6 -0
  84. package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +393 -391
  85. package/dist/templates/markdown/spec/guides/durable-learning-decision-guide.md.txt +6 -6
  86. package/dist/templates/markdown/spec/guides/execution-strategy.md.txt +2 -2
  87. package/dist/templates/markdown/spec/guides/index.md.txt +3 -2
  88. package/dist/templates/shared-hooks/index.d.ts +1 -1
  89. package/dist/templates/shared-hooks/index.js +1 -1
  90. package/dist/templates/shared-hooks/inject-subagent-context.py +3 -3
  91. package/dist/templates/shared-hooks/inject-workflow-state.py +27 -27
  92. package/dist/templates/shared-hooks/research-end-retrieval-pack.py +1 -1
  93. package/dist/templates/shared-hooks/session-start.py +3 -3
  94. package/dist/templates/trellis/config/execution-strategy-rules.json +1 -1
  95. package/dist/templates/trellis/config.yaml +4 -4
  96. package/dist/templates/trellis/local/README.md +12 -10
  97. package/dist/templates/trellis/local/patch_wpelc8.py +3 -3
  98. package/dist/templates/trellis/local/subagent-models.json.example +1 -1
  99. package/dist/templates/trellis/local/trellis-task-models.json.example +3 -3
  100. package/dist/templates/trellis/local/trellis-task-models.json5.example +5 -5
  101. package/dist/templates/trellis/local/trellis_task_models_config.py +6 -6
  102. package/dist/templates/trellis/scripts/common/cli_adapter.py +3 -3
  103. package/dist/templates/trellis/scripts/common/execution_strategy.py +1 -1
  104. package/dist/templates/trellis/scripts/common/parent_orchestration.py +702 -702
  105. package/dist/templates/trellis/scripts/common/session_context.py +1159 -1159
  106. package/dist/templates/trellis/scripts/common/subagent_dispatch.py +5 -5
  107. package/dist/templates/trellis/scripts/common/task_gates.py +2056 -2034
  108. package/dist/templates/trellis/scripts/common/task_store.py +1594 -1594
  109. package/dist/templates/trellis/workflow.md +805 -805
  110. package/dist/types/ai-tools.d.ts +1 -1
  111. package/dist/types/ai-tools.d.ts.map +1 -1
  112. package/dist/types/ai-tools.js +1 -1
  113. package/dist/types/ai-tools.js.map +1 -1
  114. package/dist/utils/project-capabilities.d.ts +14 -3
  115. package/dist/utils/project-capabilities.d.ts.map +1 -1
  116. package/dist/utils/project-capabilities.js +122 -12
  117. package/dist/utils/project-capabilities.js.map +1 -1
  118. package/dist/utils/readiness.d.ts +10 -0
  119. package/dist/utils/readiness.d.ts.map +1 -1
  120. package/dist/utils/readiness.js +6 -3
  121. package/dist/utils/readiness.js.map +1 -1
  122. package/package.json +3 -4
  123. /package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-hooks.md +0 -0
  124. /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/mcp-setup.md +0 -0
  125. /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/repository-analysis.md +0 -0
  126. /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/spec-task-planning.md +0 -0
  127. /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/spec-writing.md +0 -0
@@ -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
 
@@ -24,7 +24,7 @@ python ./.trellis/local/cursor2plus/patch_wpelc8.py --explain
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
@@ -42,9 +42,9 @@ Write `~/.ccursor/trellis-task-models.json5` (or `~/.ccursor/` on Unix) using th
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
  ```
@@ -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,7 +9,7 @@ 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
 
@@ -31,4 +31,4 @@ If `--task` is omitted, the script resolves the currently selected task. If `--r
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`
@@ -10,19 +10,19 @@ This project is managed by Trellis. The working knowledge you need lives under `
10
10
  - `.trellis/workspace/` — per-developer journals and session traces
11
11
  - `.trellis/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 Trellis 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
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.
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 Trellis. Edits outside this block are preserved; edits inside may be overwritten by a future `cstl update`.
27
27
 
28
28
  <!-- TRELLIS:END -->