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