@blxzer/cursor-trellis 0.4.2 → 0.4.3
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 +24 -0
- package/README.md +23 -14
- package/README.zh-CN.md +14 -10
- package/bin/smart-search.js +10 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +36 -15
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +42 -153
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/migrate.d.ts +10 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +38 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/update.d.ts +5 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +137 -40
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/cursor.d.ts +2 -1
- package/dist/configurators/cursor.d.ts.map +1 -1
- package/dist/configurators/cursor.js +4 -2
- package/dist/configurators/cursor.js.map +1 -1
- package/dist/configurators/index.js +4 -4
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/shared.d.ts +8 -0
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +27 -1
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts +0 -9
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +2 -4
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/constants/paths.d.ts +9 -0
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +13 -0
- package/dist/constants/paths.js.map +1 -1
- package/dist/migrations/manifests/0.3.0.json +1 -1
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/skills-and-commands.md +2 -4
- package/dist/templates/common/bundled-skills/cstl-skill-creator/SKILL.md +10 -7
- package/dist/templates/common/bundled-skills/cstl-skill-creator/references/authoring-rules.md +93 -19
- package/dist/templates/common/bundled-skills/cstl-skill-creator/references/general-authoring.md +189 -0
- package/dist/templates/common/bundled-skills/cstl-skill-creator/references/review-checklist.md +10 -5
- package/dist/templates/common/commands/continue.md +5 -4
- package/dist/templates/common/index.d.ts +20 -0
- package/dist/templates/common/index.d.ts.map +1 -1
- package/dist/templates/common/index.js +21 -2
- package/dist/templates/common/index.js.map +1 -1
- package/dist/templates/common/optional-skills/chrome-cdp/SKILL.md +179 -0
- package/dist/templates/common/optional-skills/chrome-cdp/examples/fetch-hook-api-capture.md +149 -0
- package/dist/templates/common/optional-skills/chrome-cdp/scripts/cdp.mjs +903 -0
- package/dist/templates/cursor/agents/cstl-research.md +1 -1
- 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 +7 -24
- package/dist/templates/cursor/fixtures/expected-rules.js.map +1 -1
- package/dist/templates/cursor/hooks.json +4 -0
- package/dist/templates/cursor/index.d.ts +1 -1
- package/dist/templates/cursor/index.js +1 -1
- package/dist/templates/cursor/rules/cstl-bootstrap.mdc +17 -0
- package/dist/templates/markdown/agents.md +15 -10
- package/dist/templates/markdown/framework/cursor-native-modes-guide.md.txt +12 -9
- package/dist/templates/markdown/framework/cursor-subagent-policy.md.txt +62 -126
- package/dist/templates/markdown/framework/dogfood-only-surfaces.md.txt +4 -6
- package/dist/templates/markdown/framework/execution-strategy.md.txt +2 -0
- package/dist/templates/markdown/framework/index.md.txt +4 -0
- package/dist/templates/markdown/framework/internal-skills-cursor-reachability.md.txt +4 -3
- package/dist/templates/markdown/framework/middleware-protocol.md.txt +83 -0
- package/dist/templates/markdown/framework/parallel-first-execution.md.txt +78 -0
- package/dist/templates/markdown/framework/release-boundary.md.txt +30 -0
- package/dist/templates/markdown/framework/retrieval-daily-guide.md.txt +1 -1
- package/dist/templates/markdown/framework/upgrade.md.txt +15 -0
- package/dist/templates/markdown/index.d.ts +4 -0
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +17 -0
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/markdown/spec/guides/index.md.txt +0 -6
- package/dist/templates/shared-hooks/event-bridge.py +60 -0
- package/dist/templates/shared-hooks/index.d.ts +1 -1
- package/dist/templates/shared-hooks/index.d.ts.map +1 -1
- package/dist/templates/shared-hooks/index.js +1 -0
- package/dist/templates/shared-hooks/index.js.map +1 -1
- package/dist/templates/shared-hooks/session-start.py +18 -1
- package/dist/templates/trellis/CONTEXT.md +63 -3
- package/dist/templates/trellis/gitignore.txt +39 -39
- package/dist/templates/trellis/index.d.ts +12 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +73 -15
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/pool/README.md +12 -3
- package/dist/templates/trellis/pool/plan.md +24 -5
- package/dist/templates/trellis/scripts/common/adapter_middleware.py +158 -0
- package/dist/templates/trellis/scripts/common/artifact_locale.py +12 -3
- package/dist/templates/trellis/scripts/common/cursor_retrieval_env.py +5 -2
- package/dist/templates/trellis/scripts/common/full_quality.py +237 -0
- package/dist/templates/trellis/scripts/common/git.py +6 -0
- package/dist/templates/trellis/scripts/common/git_context.py +17 -5
- package/dist/templates/trellis/scripts/common/kernel_command.py +367 -0
- package/dist/templates/trellis/scripts/common/lite_context.py +280 -0
- package/dist/templates/trellis/scripts/common/ondemand_topology.py +225 -0
- package/dist/templates/trellis/scripts/common/parent_orchestration.py +1 -1
- package/dist/templates/trellis/scripts/common/pool_store.py +16 -4
- package/dist/templates/trellis/scripts/common/retrieval_agent_instructions.py +2 -2
- package/dist/templates/trellis/scripts/common/session_context.py +28 -2
- package/dist/templates/trellis/scripts/common/task_gates.py +73 -12
- package/dist/templates/trellis/scripts/common/task_map.py +42 -9
- package/dist/templates/trellis/scripts/common/task_store.py +286 -56
- package/dist/templates/trellis/scripts/common/test_adapter_middleware.py +56 -0
- package/dist/templates/trellis/scripts/common/test_depends_mode_block.py +9 -0
- package/dist/templates/trellis/scripts/common/test_full_quality.py +197 -0
- package/dist/templates/trellis/scripts/common/test_kernel_command.py +326 -0
- package/dist/templates/trellis/scripts/common/test_lite_path.py +190 -0
- package/dist/templates/trellis/scripts/common/test_ondemand_topology.py +122 -0
- package/dist/templates/trellis/scripts/common/test_pool_store.py +17 -0
- package/dist/templates/trellis/scripts/common/test_task_store_kernel_patch.py +163 -0
- package/dist/templates/trellis/scripts/common/workflow_phase.py +3 -0
- package/dist/templates/trellis/scripts/get_context.py +1 -0
- package/dist/templates/trellis/scripts/pool.py +5 -0
- package/dist/templates/trellis/scripts/task.py +83 -7
- package/dist/templates/trellis/workflow.md +100 -18
- package/dist/utils/cursor-retrieval-env.d.ts +2 -1
- package/dist/utils/cursor-retrieval-env.d.ts.map +1 -1
- package/dist/utils/cursor-retrieval-env.js +3 -2
- package/dist/utils/cursor-retrieval-env.js.map +1 -1
- package/dist/utils/cursor2plus-residue-cleanup.d.ts +38 -0
- package/dist/utils/cursor2plus-residue-cleanup.d.ts.map +1 -0
- package/dist/utils/cursor2plus-residue-cleanup.js +145 -0
- package/dist/utils/cursor2plus-residue-cleanup.js.map +1 -0
- package/dist/utils/manifest-prune.d.ts.map +1 -1
- package/dist/utils/manifest-prune.js +7 -2
- package/dist/utils/manifest-prune.js.map +1 -1
- package/dist/utils/p36-upgrade.d.ts +62 -0
- package/dist/utils/p36-upgrade.d.ts.map +1 -0
- package/dist/utils/p36-upgrade.js +160 -0
- package/dist/utils/p36-upgrade.js.map +1 -0
- package/dist/utils/project-capabilities.d.ts +1 -12
- package/dist/utils/project-capabilities.d.ts.map +1 -1
- package/dist/utils/project-capabilities.js +3 -100
- 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 +58 -26
- 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/template-hash.d.ts.map +1 -1
- package/dist/utils/template-hash.js +11 -1
- package/dist/utils/template-hash.js.map +1 -1
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
- package/dist/utils/uninstall-scrubbers.js +52 -14
- package/dist/utils/uninstall-scrubbers.js.map +1 -1
- package/dist/utils/update-rollout-report.d.ts +14 -0
- package/dist/utils/update-rollout-report.d.ts.map +1 -1
- package/dist/utils/update-rollout-report.js +1 -0
- package/dist/utils/update-rollout-report.js.map +1 -1
- package/dist/utils/workflow-ownership.d.ts +1 -1
- package/dist/utils/workflow-ownership.js +4 -4
- package/dist/utils/workflow-ownership.js.map +1 -1
- package/package.json +5 -4
- package/scripts/postinstall.js +6 -7
- package/dist/commands/campaign/canvas-render.d.ts +0 -68
- package/dist/commands/campaign/canvas-render.d.ts.map +0 -1
- package/dist/commands/campaign/canvas-render.js +0 -414
- package/dist/commands/campaign/canvas-render.js.map +0 -1
- package/dist/commands/campaign/compose.d.ts +0 -15
- package/dist/commands/campaign/compose.d.ts.map +0 -1
- package/dist/commands/campaign/compose.js +0 -110
- package/dist/commands/campaign/compose.js.map +0 -1
- package/dist/commands/campaign/index.d.ts +0 -13
- package/dist/commands/campaign/index.d.ts.map +0 -1
- package/dist/commands/campaign/index.js +0 -134
- package/dist/commands/campaign/index.js.map +0 -1
- package/dist/commands/campaign/kind-map.d.ts +0 -6
- package/dist/commands/campaign/kind-map.d.ts.map +0 -1
- package/dist/commands/campaign/kind-map.js +0 -21
- package/dist/commands/campaign/kind-map.js.map +0 -1
- package/dist/commands/campaign/mcp-server.d.ts +0 -6
- package/dist/commands/campaign/mcp-server.d.ts.map +0 -1
- package/dist/commands/campaign/mcp-server.js +0 -167
- package/dist/commands/campaign/mcp-server.js.map +0 -1
- package/dist/commands/campaign/render.d.ts +0 -5
- package/dist/commands/campaign/render.d.ts.map +0 -1
- package/dist/commands/campaign/render.js +0 -103
- package/dist/commands/campaign/render.js.map +0 -1
- package/dist/commands/campaign/trellis-load.d.ts +0 -13
- package/dist/commands/campaign/trellis-load.d.ts.map +0 -1
- package/dist/commands/campaign/trellis-load.js +0 -122
- package/dist/commands/campaign/trellis-load.js.map +0 -1
- package/dist/commands/campaign/types.d.ts +0 -61
- package/dist/commands/campaign/types.d.ts.map +0 -1
- package/dist/commands/campaign/types.js +0 -3
- package/dist/commands/campaign/types.js.map +0 -1
- package/dist/commands/goal/index.d.ts +0 -3
- package/dist/commands/goal/index.d.ts.map +0 -1
- package/dist/commands/goal/index.js +0 -159
- package/dist/commands/goal/index.js.map +0 -1
- package/dist/commands/goal/review.d.ts +0 -6
- package/dist/commands/goal/review.d.ts.map +0 -1
- package/dist/commands/goal/review.js +0 -28
- package/dist/commands/goal/review.js.map +0 -1
- package/dist/commands/rpc/client.d.ts +0 -51
- package/dist/commands/rpc/client.d.ts.map +0 -1
- package/dist/commands/rpc/client.js +0 -147
- package/dist/commands/rpc/client.js.map +0 -1
- package/dist/commands/rpc/index.d.ts +0 -10
- package/dist/commands/rpc/index.d.ts.map +0 -1
- package/dist/commands/rpc/index.js +0 -157
- package/dist/commands/rpc/index.js.map +0 -1
- package/dist/commands/rpc/serve.d.ts +0 -23
- package/dist/commands/rpc/serve.d.ts.map +0 -1
- package/dist/commands/rpc/serve.js +0 -60
- package/dist/commands/rpc/serve.js.map +0 -1
- package/dist/commands/rpc/smoke.d.ts +0 -16
- package/dist/commands/rpc/smoke.d.ts.map +0 -1
- package/dist/commands/rpc/smoke.js +0 -92
- package/dist/commands/rpc/smoke.js.map +0 -1
- package/dist/commands/sdk/index.d.ts +0 -9
- package/dist/commands/sdk/index.d.ts.map +0 -1
- package/dist/commands/sdk/index.js +0 -58
- package/dist/commands/sdk/index.js.map +0 -1
- package/dist/commands/sdk/run.d.ts +0 -42
- package/dist/commands/sdk/run.d.ts.map +0 -1
- package/dist/commands/sdk/run.js +0 -220
- package/dist/commands/sdk/run.js.map +0 -1
- package/dist/commands/sdk/status.d.ts +0 -14
- package/dist/commands/sdk/status.d.ts.map +0 -1
- package/dist/commands/sdk/status.js +0 -69
- package/dist/commands/sdk/status.js.map +0 -1
- package/dist/configurators/cursor2plus-local.d.ts +0 -6
- package/dist/configurators/cursor2plus-local.d.ts.map +0 -1
- package/dist/configurators/cursor2plus-local.js +0 -21
- package/dist/configurators/cursor2plus-local.js.map +0 -1
- package/dist/goal/action-packet.d.ts +0 -89
- package/dist/goal/action-packet.d.ts.map +0 -1
- package/dist/goal/action-packet.js +0 -113
- package/dist/goal/action-packet.js.map +0 -1
- package/dist/goal/audit.d.ts +0 -14
- package/dist/goal/audit.d.ts.map +0 -1
- package/dist/goal/audit.js +0 -12
- package/dist/goal/audit.js.map +0 -1
- package/dist/goal/constants.d.ts +0 -26
- package/dist/goal/constants.d.ts.map +0 -1
- package/dist/goal/constants.js +0 -24
- package/dist/goal/constants.js.map +0 -1
- package/dist/goal/paths.d.ts +0 -8
- package/dist/goal/paths.d.ts.map +0 -1
- package/dist/goal/paths.js +0 -36
- package/dist/goal/paths.js.map +0 -1
- package/dist/goal/preflight.d.ts +0 -21
- package/dist/goal/preflight.d.ts.map +0 -1
- package/dist/goal/preflight.js +0 -97
- package/dist/goal/preflight.js.map +0 -1
- package/dist/goal/review-seam.d.ts +0 -44
- package/dist/goal/review-seam.d.ts.map +0 -1
- package/dist/goal/review-seam.js +0 -153
- package/dist/goal/review-seam.js.map +0 -1
- package/dist/goal/reviewer-rules.d.ts +0 -13
- package/dist/goal/reviewer-rules.d.ts.map +0 -1
- package/dist/goal/reviewer-rules.js +0 -153
- package/dist/goal/reviewer-rules.js.map +0 -1
- package/dist/goal/reviewer.d.ts +0 -9
- package/dist/goal/reviewer.d.ts.map +0 -1
- package/dist/goal/reviewer.js +0 -54
- package/dist/goal/reviewer.js.map +0 -1
- package/dist/goal/runtime.d.ts +0 -32
- package/dist/goal/runtime.d.ts.map +0 -1
- package/dist/goal/runtime.js +0 -242
- package/dist/goal/runtime.js.map +0 -1
- package/dist/goal/sdk-client.d.ts +0 -10
- package/dist/goal/sdk-client.d.ts.map +0 -1
- package/dist/goal/sdk-client.js +0 -34
- package/dist/goal/sdk-client.js.map +0 -1
- package/dist/goal/state.d.ts +0 -40
- package/dist/goal/state.d.ts.map +0 -1
- package/dist/goal/state.js +0 -37
- package/dist/goal/state.js.map +0 -1
- package/dist/goal/task-triggers.d.ts +0 -15
- package/dist/goal/task-triggers.d.ts.map +0 -1
- package/dist/goal/task-triggers.js +0 -23
- package/dist/goal/task-triggers.js.map +0 -1
- package/dist/goal/walls.d.ts +0 -12
- package/dist/goal/walls.d.ts.map +0 -1
- package/dist/goal/walls.js +0 -65
- package/dist/goal/walls.js.map +0 -1
- package/dist/goal/worker-prompt.d.ts +0 -13
- package/dist/goal/worker-prompt.d.ts.map +0 -1
- package/dist/goal/worker-prompt.js +0 -41
- package/dist/goal/worker-prompt.js.map +0 -1
- package/dist/goal/worker.d.ts +0 -42
- package/dist/goal/worker.d.ts.map +0 -1
- package/dist/goal/worker.js +0 -180
- package/dist/goal/worker.js.map +0 -1
- package/dist/templates/common/bundled-skills/cstl-cursor2plus-setup/SKILL.md +0 -63
- package/dist/templates/cursor/commands/cursor2plus-setup.md +0 -82
- package/dist/templates/cursor/rules/cstl-cursor-modes.mdc +0 -32
- package/dist/templates/cursor/rules/cstl-session-rename.mdc +0 -31
- package/dist/templates/cursor/rules/cstl-subagent-dispatch.mdc +0 -34
- package/dist/templates/cursor/rules/cstl-triage.mdc +0 -36
- package/dist/templates/cursor/rules/retrieval-routing.mdc +0 -78
- package/dist/templates/trellis/local/README.md +0 -85
- package/dist/templates/trellis/local/config.local.json.example +0 -6
- package/dist/templates/trellis/local/index.d.ts +0 -8
- package/dist/templates/trellis/local/index.d.ts.map +0 -1
- package/dist/templates/trellis/local/index.js +0 -15
- package/dist/templates/trellis/local/index.js.map +0 -1
- package/dist/templates/trellis/local/patch_wpelc8.py +0 -421
- package/dist/templates/trellis/local/smoke.py +0 -94
- package/dist/templates/trellis/local/subagent-models.json.example +0 -4
- package/dist/templates/trellis/local/trellis-task-models.json.example +0 -10
- package/dist/templates/trellis/local/trellis-task-models.json5.example +0 -45
- package/dist/templates/trellis/local/trellis_task_models_config.py +0 -200
- package/dist/utils/cursor-sdk-gate.d.ts +0 -10
- package/dist/utils/cursor-sdk-gate.d.ts.map +0 -1
- package/dist/utils/cursor-sdk-gate.js +0 -32
- package/dist/utils/cursor-sdk-gate.js.map +0 -1
|
@@ -68,7 +68,7 @@ Run independent searches in parallel (Glob + Grep + smart-search CLI for externa
|
|
|
68
68
|
|
|
69
69
|
#### External search — provider relevance caveats
|
|
70
70
|
|
|
71
|
-
- **Context7** and generic third-party library docs are often **irrelevant** to Trellis/Cursor platform questions. Prefer **Cursor
|
|
71
|
+
- **Context7** and generic third-party library docs are often **irrelevant** to Trellis/Cursor platform questions. Prefer **Cursor official documentation**, `docs.cursor.com`, and **local `.cstl/spec/`** before trusting Context7 hits.
|
|
72
72
|
- Every smart-search result you persist must **label the provider source** (e.g. `exa`, `context7`, `cursor-docs`, `tavily`) in the research file — in frontmatter or per bullet — so downstream check/finish can audit provenance.
|
|
73
73
|
- Trellis harness facts: `./.cstl/scripts/run_smart_search.py` writes manifests under `{TASK}/research/smart-search/<run-id>/`; scored pack output (when built) is `{TASK}/research/retrieval-pack-latest.json`.
|
|
74
74
|
|
|
@@ -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. "cstl-
|
|
6
|
+
/** Filename including .mdc extension, e.g. "cstl-bootstrap.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,
|
|
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,EAavC,CAAC"}
|
|
@@ -4,32 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export const expectedRules = [
|
|
6
6
|
{
|
|
7
|
-
filename: "cstl-
|
|
7
|
+
filename: "cstl-bootstrap.mdc",
|
|
8
8
|
requiredSections: [
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
9
|
+
"Event Bridge",
|
|
10
|
+
"Capability router",
|
|
11
|
+
"external-knowledge",
|
|
12
|
+
"Optional",
|
|
13
|
+
"Native SSOT",
|
|
14
|
+
".cstl/middleware",
|
|
12
15
|
],
|
|
13
|
-
minBytes: 500,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
filename: "cstl-subagent-dispatch.mdc",
|
|
17
|
-
requiredSections: ["Layer 2", "generate_dispatch_prompt", "CLI"],
|
|
18
|
-
minBytes: 400,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
filename: "retrieval-routing.mdc",
|
|
22
|
-
requiredSections: ["Prefer", "Adapt", "Own", "Native", "BYOK", "codegraph", "smart-search"],
|
|
23
|
-
minBytes: 600,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
filename: "cstl-session-rename.mdc",
|
|
27
|
-
requiredSections: ["rename_chat", "select", "start-execution", "skip silently"],
|
|
28
|
-
minBytes: 300,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
filename: "cstl-cursor-modes.mdc",
|
|
32
|
-
requiredSections: ["Prefer Cursor native modes", "Quick routing", "Hard boundaries", "Rollback"],
|
|
33
16
|
minBytes: 400,
|
|
34
17
|
},
|
|
35
18
|
];
|
|
@@ -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,
|
|
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,cAAc;YACd,mBAAmB;YACnB,oBAAoB;YACpB,UAAU;YACV,aAAa;YACb,kBAAkB;SACnB;QACD,QAAQ,EAAE,GAAG;KACd;CACF,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Directory structure:
|
|
5
5
|
* cursor/
|
|
6
6
|
* ├── agents/ # Sub-agent definitions
|
|
7
|
-
* ├── commands/ # Cursor-only slash commands (
|
|
7
|
+
* ├── commands/ # Cursor-only slash commands (optional extras)
|
|
8
8
|
* ├── rules/ # .cursor/rules/*.mdc (alwaysApply / glob-scoped rules)
|
|
9
9
|
* ├── hooks.json # Hooks configuration
|
|
10
10
|
* └── worktrees.json # Cursor native worktree setup
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Directory structure:
|
|
5
5
|
* cursor/
|
|
6
6
|
* ├── agents/ # Sub-agent definitions
|
|
7
|
-
* ├── commands/ # Cursor-only slash commands (
|
|
7
|
+
* ├── commands/ # Cursor-only slash commands (optional extras)
|
|
8
8
|
* ├── rules/ # .cursor/rules/*.mdc (alwaysApply / glob-scoped rules)
|
|
9
9
|
* ├── hooks.json # Hooks configuration
|
|
10
10
|
* └── worktrees.json # Cursor native worktree setup
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Cursor Adapter Bootstrap — Event Bridge pointer, four retrieval intents, independent Middleware. Prefer this thin rule over adding more always-on."
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cursor Adapter Bootstrap
|
|
7
|
+
|
|
8
|
+
This is the **single thin Bootstrap** for Cursor. It points; it does not carry full Triage, Gate, smart-search, or codegraph methodology.
|
|
9
|
+
|
|
10
|
+
- **Event Bridge:** Cursor hook events (`sessionStart` and others) record/dispatch through Kernel `event_bridge` extras. Unsubscribed modules must not fail the hook.
|
|
11
|
+
- **Capability router:** Baseline intents are only `exact` / `semantic` / `structural` / `external`. Do not bind Agent tool names here.
|
|
12
|
+
- **external-knowledge:** smart-search is an independent Middleware Provider. Probe readiness. Missing → Profile `degraded`. Tasks that do not need the capability may Close. Platform Web is a downgrade, not an equivalent.
|
|
13
|
+
- **Optional code intelligence:** codegraph and fast-context stay Optional. Do not treat them as default always-on or forced install.
|
|
14
|
+
- **Native SSOT:** no Cursor++ command/skill/init ask and no cstl-byok live install on this surface. Env probe fields (`TRELLIS_CURSOR_BYOK`, `~/.ccursor/routes.json`) may remain.
|
|
15
|
+
- **User overlay:** project `.cstl/middleware/` Manifests. `cstl init` / `cstl update` never write, delete, or hash that directory. Protocol: `.cstl/framework/middleware-protocol.md`.
|
|
16
|
+
|
|
17
|
+
This is the only default always-on rule. Do **not** add middleware-specific always-on. Methodology lives in `.cstl/workflow.md` (human overview, not runtime SSOT) and on-demand docs.
|
|
@@ -5,7 +5,10 @@ These instructions are for AI assistants working in this project.
|
|
|
5
5
|
|
|
6
6
|
This project is managed by cursor-trellis. The working knowledge you need lives under `.cstl/`:
|
|
7
7
|
|
|
8
|
-
- `.cstl/workflow.md` —
|
|
8
|
+
- `.cstl/workflow.md` — human overview of phases and skill routing (not runtime SSOT). Parallel first (convention, not a CLI gate). Personal Lite: Open→Close without Parent/Git; Full Quality: `required_controls` + AC ledger + graded Check; Topology/On-demand: Rigor × Topology, `task-map` is a graph projection; Adapter/Middleware: Event Bridge + four retrieval intents + independent smart-search Provider; user overlay `.cstl/middleware/` is never touched by `cstl update`; prefer `get_context.py --mode lite` for Lite
|
|
9
|
+
- `.cstl/framework/middleware-protocol.md` — Middleware Protocol v1 (one ABI; Manifest sample)
|
|
10
|
+
- `.cstl/framework/upgrade.md` — terminal-user upgrade half-page
|
|
11
|
+
- `.cstl/framework/release-boundary.md` — CSTL this-batch ship vs independent cstl-byok ship
|
|
9
12
|
- `.cstl/spec/` — package- and layer-scoped coding guidelines (read before writing code in a given layer)
|
|
10
13
|
- `.cstl/workspace/` — per-developer journals and session traces
|
|
11
14
|
- `.cstl/tasks/` — active and archived tasks (PRDs, research, jsonl context)
|
|
@@ -19,21 +22,16 @@ Only a handful of Trellis entry points are meant for **manual `/` invocation**.
|
|
|
19
22
|
- **User-invocable (manual)**: `cstl-continue`, `cstl-finish-work` (and `cstl-start` when needed).
|
|
20
23
|
- **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
24
|
|
|
22
|
-
##
|
|
25
|
+
## Skill authoring (mandatory)
|
|
23
26
|
|
|
24
|
-
**
|
|
25
|
-
|
|
26
|
-
- Prefer: `cstl goal status` / `cstl goal preflight …` in the project terminal.
|
|
27
|
-
- Do **not** invent a "goal" task kind or map "use goal" onto `add-subtask` / Parent-only planning.
|
|
28
|
-
- Default Cursor install has **no** `/cstl-goal` slash command (optional dogfood/extension only).
|
|
29
|
-
- Task directory `handoff.md` = child integration evidence; session handoff = `/cstl-handoff` (temp file).
|
|
27
|
+
When **creating** or making a **behavioral/structural** change to a Trellis bundled skill, a `blaze-skills` skill, or a harness skill, **first Read** `cstl-skill-creator` and follow its workflow + `references/review-checklist.md`. Do not hand-write around it. **Skip** for typo / pure link fixes. This skill is **internal** (not a user `/` command). **Does not apply** to Cursor product skills (e.g. `~/.cursor/skills-cursor/create-skill`). Load paths: see `.cstl/framework/internal-skills-cursor-reachability.md` (`cstl-skill-creator` row).
|
|
30
28
|
|
|
31
29
|
## Invocation map (short)
|
|
32
30
|
|
|
33
31
|
| Intent | Use | Do not |
|
|
34
32
|
| --- | --- | --- |
|
|
35
33
|
| Session handoff | `/cstl-handoff` → report temp path | task `handoff.md`; ad-hoc workspace handoff |
|
|
36
|
-
|
|
|
34
|
+
| Durable objective | official Cursor `/goal` | restore `cstl-goal`; treat as Parent/Child or a Trellis task type |
|
|
37
35
|
| User slash surface | only listed `/cstl-*` commands | assume internal skills are slash commands |
|
|
38
36
|
| Internal skills (brainstorm, …) | workflow says load → Read documented path (see guides); not user slash | claim loaded with no file read |
|
|
39
37
|
|
|
@@ -44,12 +42,19 @@ Commands-only: internal skills stay **out of** the `/` palette by design; they m
|
|
|
44
42
|
Internal auto-triggered skills are **not** shipped to `.cursor/skills/` and have **no** default slash command. When the workflow routes to one, load its body by reading a documented path — do **not** claim it is loaded without a file read.
|
|
45
43
|
|
|
46
44
|
- PRD Grill / brainstorm discipline → **`Read .cstl/framework/prd-grill-frontier.md`** (SSOT: bundled `common/skills/brainstorm.md`).
|
|
45
|
+
- Skill authoring (new / structural) → **must Read** bundled `cstl-skill-creator/SKILL.md` then `references/review-checklist.md` (paths in `internal-skills-cursor-reachability.md`). Not a slash command.
|
|
47
46
|
- Full skill × load-channel matrix → **`Read .cstl/framework/internal-skills-cursor-reachability.md`**.
|
|
48
47
|
- Dogfood-only install surfaces (never shipped by default) → **`Read .cstl/framework/dogfood-only-surfaces.md`**.
|
|
49
48
|
|
|
49
|
+
## Durable objectives (official /goal)
|
|
50
|
+
|
|
51
|
+
For a persistent in-session objective, use Cursor's official `/goal`. That is **not** a Trellis task type and **not** Parent/Child. Do **not** restore or invent `cstl-goal` / `cstl goal`.
|
|
52
|
+
|
|
53
|
+
Default install is **Native Cursor**. CSTL does **not** embed BYOK (no install-time BYOK; an optional independent track stays outside this package).
|
|
54
|
+
|
|
50
55
|
## Web research routing (smart-search first)
|
|
51
56
|
|
|
52
|
-
For **any external / current / web fact**,
|
|
57
|
+
For **any external / current / web fact**, use the independent **smart-search** Provider (`smart-search` CLI when installed). Maintainer installs may still have `run_smart_search.py`; it is not Baseline. Platform built-in web tools are **downgrade-only fallbacks**. Follow `.cstl/framework/retrieval-daily-guide.md`.
|
|
53
58
|
|
|
54
59
|
**External-knowledge gate:** If the answer would be wrong because the **world or a third-party API moved** and that matters → use smart-search (cheap `docs` / `broad-search` when enough; `deep-research` when multi-source). If truth lives only in this workspace → do not default to web. When unsure, prefer a cheap probe over guessing. See `.cstl/framework/retrieval-daily-guide.md` § External-knowledge gate.
|
|
55
60
|
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
| **Plan** | Scope / design / tradeoffs before code | **Try `SwitchMode(plan)`**; after review, `SwitchMode(agent)` or Build; **Save to workspace** → map into task files | Keep writing `prd.md` / `design.md` / `implement.md` + `cstl-brainstorm` in Agent | Phase 1 files |
|
|
32
32
|
| **Agent** | Approved build / verify | Default; `SwitchMode(agent)` when returning from Plan | — | Diff, `verify.md`, gates |
|
|
33
33
|
| **Debug** | Repro / runtime / regressions | Prefer real Cursor Debug when the user/session can reach it | Evidence → `verify.md`; `cstl-break-loop` if looped | Notes / logs in `verify.md` |
|
|
34
|
-
| **Multitask** | Independent Parent children post-approval | Prefer `/multitask` / Build in Parallel / Agent `Task`
|
|
34
|
+
| **Multitask** | Independent Parent children post-approval (**default** when ≥2 units, empty `depends_on`) | Prefer `/multitask` / Build in Parallel / Agent `Task` / native worktree — **not** a Trellis scheduler | Explicit `.cstl/tasks/<dir>` prompts + Parent `integrate-child`; serial needs `serial_reason` | Child `verify`/`handoff`; Parent `task-map` |
|
|
35
35
|
|
|
36
36
|
### Phase quick map
|
|
37
37
|
|
|
@@ -40,7 +40,7 @@ Triage (No Task / Micro-Grill) → Ask surface if present; else No Task in Agen
|
|
|
40
40
|
Phase 1 → SwitchMode(plan) when useful; else write artifacts in Agent
|
|
41
41
|
Phase 2–3 → Agent (+ workers when contracted)
|
|
42
42
|
Stuck / repeat failure → Debug when reachable; else verify.md + break-loop
|
|
43
|
-
Parent parallel children → Multitask / Task parallel
|
|
43
|
+
Parent parallel children → Multitask / Task parallel **by default**; serial needs serial_reason; Parent integrates
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
---
|
|
@@ -67,10 +67,11 @@ Parent parallel children → Multitask / Task parallel when useful; Paren
|
|
|
67
67
|
|
|
68
68
|
### Multitask ↔ Parent/Child
|
|
69
69
|
|
|
70
|
-
1. Trellis remains source of truth for status, gates, integration.
|
|
71
|
-
2.
|
|
72
|
-
3.
|
|
73
|
-
4.
|
|
70
|
+
1. Trellis remains source of truth for status, gates, integration. This is **not** a Trellis-built parallel product — Prefer Cursor Multitask / Build in Parallel / Agent `Task` / native worktree.
|
|
71
|
+
2. **Default parallel** when planning has ≥2 independent units (Parent children with empty `depends_on`, or Full Task fan-out). Lite / single-file work is not forced into parallel agents.
|
|
72
|
+
3. **Serial needs a written reason** (`serial_reason`): shared write-set / HITL or reviewer gate / `depends_on` unmet / user asked serial / conflict surface cannot isolate. HITL, `start-execution --approved`, reviewer gates, and `integrate-child` stay serial even when workers run in parallel (`merge_limit: 1`).
|
|
73
|
+
4. Every worker prompt includes **explicit `.cstl/tasks/<dir>`** — never rely on `selected_task`.
|
|
74
|
+
5. Parent alone `integrate-child`; no collision guarantee without worktrees + review. Declare 可并行组 / 合并点 / 冲突面 on the task-map — see `.cstl/framework/parallel-first-execution.md`.
|
|
74
75
|
|
|
75
76
|
---
|
|
76
77
|
|
|
@@ -79,7 +80,7 @@ Parent parallel children → Multitask / Task parallel when useful; Paren
|
|
|
79
80
|
| Surface | Plan | Agent | Ask | Debug | Parallel Children |
|
|
80
81
|
| --- | --- | --- | --- | --- | --- |
|
|
81
82
|
| Agent `SwitchMode` | Yes → `plan` | Yes → `agent` | — | — | — |
|
|
82
|
-
| Agent `Task` / Multitask | — | workers | — | — | Prefer
|
|
83
|
+
| Agent `Task` / Multitask | — | workers | — | — | Prefer **by default** (serial needs `serial_reason`) |
|
|
83
84
|
| User / CLI modes | Plan UI / `/plan` | default | Ask UI / `/ask` | Debug UI | `/multitask`, Build in Parallel |
|
|
84
85
|
|
|
85
86
|
Details: `research/modes-callability-matrix.md`.
|
|
@@ -93,6 +94,7 @@ Details: `research/modes-callability-matrix.md`.
|
|
|
93
94
|
- Parallel agents cannot conflict without Trellis/worktree discipline.
|
|
94
95
|
- `SwitchMode` can open Ask or Debug.
|
|
95
96
|
- Shipping a parallel fake Plan/Ask/Debug product, or documenting gaps as “本版本不适配”.
|
|
97
|
+
- Replacing Cursor Multitask with a Trellis scheduler, queue, or new parallel CLI.
|
|
96
98
|
|
|
97
99
|
---
|
|
98
100
|
|
|
@@ -102,7 +104,7 @@ Details: `research/modes-callability-matrix.md`.
|
|
|
102
104
|
| --- | --- | --- |
|
|
103
105
|
| **Plan** | Schema or live `SwitchMode(plan)` note in verify | Prefer path documented; quiet Agent fallback if unused |
|
|
104
106
|
| **Ask / Debug** | Callability matrix | Quiet spine behavior; no “不适配” section |
|
|
105
|
-
| **Multitask** | Task parallel or doc contract | Explicit child paths; Parent integrates |
|
|
107
|
+
| **Multitask** | Task parallel or doc contract | Explicit child paths; default parallel; serial has `serial_reason`; Parent integrates |
|
|
106
108
|
| **Agent** | Session implements under contract | Artifacts on disk |
|
|
107
109
|
|
|
108
110
|
---
|
|
@@ -111,7 +113,7 @@ Details: `research/modes-callability-matrix.md`.
|
|
|
111
113
|
|
|
112
114
|
Docs + rules only:
|
|
113
115
|
|
|
114
|
-
1. Delete `.cursor/rules/cstl-cursor-modes.mdc
|
|
116
|
+
1. Delete `.cursor/rules/cstl-cursor-modes.mdc`, `.cstl/framework/cursor-native-modes-guide.md`, and `.cstl/framework/parallel-first-execution.md`.
|
|
115
117
|
2. Drop related `guides/index.md` / `workflow.md` rows, or `cstl update` from pre-P1 templates.
|
|
116
118
|
3. **cursor-trellis**: revert this Child’s tip or delete mirrored template paths.
|
|
117
119
|
|
|
@@ -123,3 +125,4 @@ Docs + rules only:
|
|
|
123
125
|
- `{TASK}/research/cursor-modes-external.md`
|
|
124
126
|
- `.cursor/rules/cstl-cursor-modes.mdc`
|
|
125
127
|
- `.cstl/framework/cursor-subagent-policy.md`
|
|
128
|
+
- `.cstl/framework/parallel-first-execution.md`
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> **Purpose:** Cursor-first guidance for when to spawn Trellis custom agents, which mode to use, and how model choice stays on the Cursor side.
|
|
4
4
|
|
|
5
|
+
> **⚠️ Cursor++ 路线已废弃(2026-08-19 用户裁决)**:Trellis 不再为 Cursor++ / `cstl-cursor2plus-setup` / `.cstl/local/cursor2plus/` 服务。现行路径 = **Native Cursor API**。Cursor++ 产品面已从 Trellis SSOT 移除;遗留 `.cstl/local/cursor2plus/` 视为死档残渣(勿 patch)。下文 **Historical appendix** 仅保留 Method 2.5/2.6 证据摘要,**禁止当操作指南**(勿 patch、勿 Reload、勿跑 `patch_wpelc8.py`)。
|
|
6
|
+
|
|
5
7
|
**Abstract policy:** `model_policy: cursor-configured` — Trellis workflow, agents, skills, and hooks **must not** hardcode vendor model IDs in **committed** defaults (`gpt-*`, `claude-*`, etc.).
|
|
6
8
|
|
|
7
9
|
---
|
|
@@ -14,13 +16,13 @@ The same `cstl-*` name can be reached via three entry points with **different mo
|
|
|
14
16
|
How did I reach cstl-research / cstl-implement / cstl-check?
|
|
15
17
|
│
|
|
16
18
|
├─ Opened a Cursor chat and @mentioned or /slash-invoked it
|
|
17
|
-
│ → Agent session. Top-bar model decides.
|
|
18
|
-
│ largely ineffective under BYOK. Do NOT expect json5 + Method 2.5 here.
|
|
19
|
+
│ → Agent session. Top-bar model decides.
|
|
19
20
|
│
|
|
20
21
|
├─ Main session dispatched Task(subagent_type=cstl-*)
|
|
21
|
-
│ → Task dispatch.
|
|
22
|
-
│
|
|
23
|
-
│
|
|
22
|
+
│ → Task dispatch. Native: frontmatter `model:` (Method 4) may apply.
|
|
23
|
+
│ BYOK env: inherit parent unless the gateway override
|
|
24
|
+
│ is configured. Context: CLI Layer 2 pre-embed (primary on Cursor);
|
|
25
|
+
│ hook is best-effort (<!-- cstl-hook-injected --> marker).
|
|
24
26
|
│
|
|
25
27
|
└─ Used the cstl-check SKILL in main session (no subagent spawn)
|
|
26
28
|
→ Skill form. Main-session model. Only cstl-check has both
|
|
@@ -39,34 +41,34 @@ If unsure: Task dispatch is the path Trellis workflow routes through; Agent sess
|
|
|
39
41
|
| Implementation (after `start-execution --approved`) | `cstl-implement` | Agent | Code edits; no `git commit` in subagent; **CLI Layer 2** dispatch prompt on Cursor |
|
|
40
42
|
| Post-implementation verification | `cstl-check` | Agent | Fixes + `verify.md` / gate hints; **CLI Layer 2** on Cursor; main session records gates |
|
|
41
43
|
| Parent/Child child worker | `generate-child-prompt --mode subagent` | **Parent Task** `cstl-implement` (default) | Child delivers `verify.md` + `handoff.md`; rare per-child model → **new writable Agent** session when user names that child |
|
|
42
|
-
| Architecture / deep review | `cstl-check` or documented inline deep review | Agent or main session | Model via dispatch strategy (Methods 1–
|
|
44
|
+
| Architecture / deep review | `cstl-check` or documented inline deep review | Agent or main session | Model via dispatch strategy (Methods 1–4 below) |
|
|
43
45
|
| PRD Grill (planning) | `cstl-micro-grill` contract **inside** `cstl-brainstorm` | **Not** a subagent | Single-question business follow-ups only |
|
|
44
46
|
| Small unclear ask (no task) | `cstl-micro-grill` skill | Main session | No task artifacts by default |
|
|
45
47
|
|
|
46
48
|
---
|
|
47
49
|
|
|
48
|
-
## Model dispatch strategy (BYOK
|
|
49
|
-
|
|
50
|
-
> **Model routing details:** See Method 2.5 / 2.6 below and Cursor++ provider settings (`~/.ccursor/providers.json`).
|
|
50
|
+
## Model dispatch strategy (Native / BYOK env detection)
|
|
51
51
|
|
|
52
52
|
### Environment detection
|
|
53
53
|
|
|
54
|
-
|
|
|
55
|
-
| --------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
|
|
56
|
-
| **Native Cursor API** | Frontmatter `model:` works (server-side routing) | Native model picker |
|
|
57
|
-
| **Cursor++ BYOK** | ❌ Frontmatter / Cursor Settings per-agent: not wired for `cstl-*`; **✅ Method 2.5** if applied | ✅ Independent model via Cursor++ panel (v0.0.11+) |
|
|
54
|
+
`cursorEnv` (`native` | `byok` | `unknown`) comes from `~/.ccursor/routes.json` `byokMode` or `TRELLIS_CURSOR_BYOK`. Detection is for retrieval/model env split (`cursorEnv`) — **not** a Cursor++ install path.
|
|
58
55
|
|
|
59
|
-
|
|
56
|
+
| Environment | Custom Task subagent model control | Explore subagent model control |
|
|
57
|
+
| ----------- | ---------------------------------- | ------------------------------ |
|
|
58
|
+
| **Native Cursor API** | Frontmatter `model:` works (server-side routing) | Native model picker |
|
|
59
|
+
| **BYOK env (`cursorEnv=byok`)** | Inherit parent session model unless the gateway override is configured | Native / gateway picker — **not** a Cursor++ panel |
|
|
60
|
+
|
|
61
|
+
Do **not** install Cursor++ or run archived `patch_wpelc8.py`. Without a gateway override, custom Task subagents **inherit** the parent session model.
|
|
60
62
|
|
|
61
63
|
### Dispatch strategy matrix
|
|
62
64
|
|
|
63
|
-
| Subagent type | Independent model?
|
|
64
|
-
| ----------------------------------- |
|
|
65
|
-
| **Explore** (built-in) | ✅ Yes
|
|
66
|
-
| **cstl-research** (custom Task) |
|
|
67
|
-
| **cstl-implement** (custom Task) |
|
|
68
|
-
| **cstl-check** (custom Task) |
|
|
69
|
-
| **generalPurpose** / **shell** / **best-of-n-runner** |
|
|
65
|
+
| Subagent type | Independent model? | Method | Fallback |
|
|
66
|
+
| ----------------------------------- | ------------------ | ------ | -------- |
|
|
67
|
+
| **Explore** (built-in) | ✅ Yes (Native picker) | Method 2 | Inherit parent model |
|
|
68
|
+
| **cstl-research** (custom Task) | Native: Method 4 overlay; else inherit | Method 1 or **Method 3** (manual) | Inherit parent model |
|
|
69
|
+
| **cstl-implement** (custom Task) | Native: Method 4 overlay; else inherit | Method 1 or **Method 3** | Inherit parent model |
|
|
70
|
+
| **cstl-check** (custom Task) | Native: Method 4 overlay; else inherit | Method 1 or **Method 3** | Inherit parent model |
|
|
71
|
+
| **generalPurpose** / **shell** / **best-of-n-runner** | Inherit unless Native overlay | Method 1 or Method 3 | Inherit parent model |
|
|
70
72
|
|
|
71
73
|
### When to ask (and when not)
|
|
72
74
|
|
|
@@ -84,7 +86,7 @@ Task mode (Lite / Full / Parent) does **not** by itself trigger the question —
|
|
|
84
86
|
|
|
85
87
|
### Method 2: Explore subagent with custom model (read-only research)
|
|
86
88
|
|
|
87
|
-
When research is purely **codebase exploration** (no external web search, no file writing outside exploration scope), dispatch an **Explore subagent** instead of cstl-research.
|
|
89
|
+
When research is purely **codebase exploration** (no external web search, no file writing outside exploration scope), dispatch an **Explore subagent** instead of cstl-research. Pick the Explore model with the **Native** model picker (or inherit).
|
|
88
90
|
|
|
89
91
|
**Constraints:**
|
|
90
92
|
|
|
@@ -94,40 +96,9 @@ When research is purely **codebase exploration** (no external web search, no fil
|
|
|
94
96
|
|
|
95
97
|
**Use when:** Pure codebase search/understanding tasks where a different model adds value. Main session receives findings and writes the research files.
|
|
96
98
|
|
|
97
|
-
### Method 2.5: Cursor++ BYOK proxy map (publishable bundle)
|
|
98
|
-
|
|
99
|
-
**What it is:** A reversible patch to Cursor++ `extension.js` **subagent model resolver** that maps `subagentType` → BYOK catalog **slug** (`model-xxxxx`), evaluated **before** the inherit-parent branch. Obfuscated symbol names change per build (historical `WPeLc8`; 2026-08+ profile `ZiKp4I`). Script uses multi-profile detection.
|
|
100
|
-
|
|
101
|
-
**Trellis ships (every `cstl init` / `cstl update`, strategy C):** `.cstl/local/cursor2plus/` — `patch_wpelc8.py`, `README.md`, **`UPGRADE-NOTE.md`** (upgrade re-apply), `config.local.json.example`. Native Cursor API users can ignore this directory.
|
|
102
|
-
|
|
103
|
-
**Operator workflow (Cursor++ BYOK only):**
|
|
104
|
-
|
|
105
|
-
1. Fill **`~/.ccursor/trellis-task-models.json5`** (user-wide) with `subagent_type` → displayName/apiModel from **`~/.ccursor/providers.json`**.
|
|
106
|
-
2. Optionally override per repo: **`.cstl/local/subagent-models.json5`** (project wins on same key).
|
|
107
|
-
3. If paths are not auto-detected: copy `config.local.json.example` → `config.local.json`, or run `python patch_wpelc8.py --bootstrap`, or set `TRELLIS_CCURSOR_HOME` / `TRELLIS_CURSOR2PLUS_EXTENSION`.
|
|
108
|
-
4. From `.cstl/local/cursor2plus/`: `python patch_wpelc8.py --check-compat` → `--print-map` → `--apply --approve` → **Developer: Reload Window**.
|
|
109
|
-
5. **Verify:** A≠B probe (parent model ≠ map target) or `resolvedModelId` matches slug.
|
|
110
|
-
|
|
111
|
-
**Revert:** `python patch_wpelc8.py --revert`; Reload Window.
|
|
112
|
-
|
|
113
|
-
**After any Cursor / Cursor++ upgrade:** assume patch is stale — follow **`.cstl/local/cursor2plus/UPGRADE-NOTE.md`** (`--check-compat`, re-apply, or add a new resolver profile if symbols moved).
|
|
114
|
-
|
|
115
|
-
**Cursor++ sidebar / Cursor Settings:** Do **not** wire `cstl-*` BYOK routing; use JSON + patch.
|
|
116
|
-
|
|
117
|
-
### Method 2.6: Temporary Task types (advanced, BYOK)
|
|
118
|
-
|
|
119
|
-
For rare per-dispatch models on the Task channel without changing global slots:
|
|
120
|
-
|
|
121
|
-
1. Add `.cursor/agents/cstl-worker-<id>.md` (role prompt only; no committed `model:`).
|
|
122
|
-
2. Add `"cstl-worker-<id>": "model-xxxxx"` to **project** `.cstl/local/subagent-models.json`.
|
|
123
|
-
3. Re-run `patch_wpelc8.py`; dispatch `Task(subagent_type=cstl-worker-<id>)`.
|
|
124
|
-
4. Remove agent file and JSON key when done.
|
|
125
|
-
|
|
126
|
-
Parent/Child **default** does not use 2.6 — it uses `cstl-implement` from the user map. Per-child manual model → **new writable Agent** session (user-named exception).
|
|
127
|
-
|
|
128
99
|
### Method 3: Manual dispatch (different model for Task subagent)
|
|
129
100
|
|
|
130
|
-
When a custom Task subagent (`cstl-research`, `cstl-implement`, `cstl-check`) needs a **different model** than the parent
|
|
101
|
+
When a custom Task subagent (`cstl-research`, `cstl-implement`, `cstl-check`) needs a **different model** than the parent **and** Native overlay (Method 4) is not available or not desired:
|
|
131
102
|
|
|
132
103
|
1. **Main session prepares the dispatch prompt** — full text with:
|
|
133
104
|
- First line: Selected task: <path> (e.g. .cstl/tasks/06-17-my-task)
|
|
@@ -168,12 +139,10 @@ Under **native Cursor API** (non-BYOK), frontmatter model: on agent files works
|
|
|
168
139
|
|
|
169
140
|
```text
|
|
170
141
|
Subagent dispatch needed
|
|
171
|
-
├─ Cursor++ BYOK + cstl-* needs fixed per-role models?
|
|
172
|
-
│ └─ Method 2.5 applied on this machine? → dispatch Task normally (map handles routing)
|
|
173
142
|
├─ Parent model appropriate for cstl-*? → Method 1 (inherit)
|
|
174
|
-
├─ Read-only codebase exploration only? → Method 2 (Explore +
|
|
143
|
+
├─ Read-only codebase exploration only? → Method 2 (Explore + Native picker)
|
|
175
144
|
├─ Native Cursor API (non-BYOK)? → Method 4 (ephemeral frontmatter overlay)
|
|
176
|
-
└─
|
|
145
|
+
└─ Different model required, overlay unavailable? → Method 3 (manual dispatch)
|
|
177
146
|
```
|
|
178
147
|
|
|
179
148
|
### Main-session contract
|
|
@@ -181,46 +150,44 @@ Subagent dispatch needed
|
|
|
181
150
|
When a dispatch is imminent:
|
|
182
151
|
|
|
183
152
|
1. Assess which method applies based on the decision flow.
|
|
184
|
-
2. If
|
|
185
|
-
3. If Method
|
|
186
|
-
4. If Method
|
|
187
|
-
5. If Method
|
|
188
|
-
6. If Method 4 (overlay, native API): ask model preference, apply overlay, dispatch, restore.
|
|
153
|
+
2. If Method 1 (inherit): dispatch directly, no model question.
|
|
154
|
+
3. If Method 2 (Explore): set Explore model in the Native picker if needed, dispatch `explore`.
|
|
155
|
+
4. If Method 3 (manual): prepare the full dispatch prompt, present to user.
|
|
156
|
+
5. If Method 4 (overlay, native API): ask model preference, apply overlay, dispatch, restore.
|
|
189
157
|
|
|
190
158
|
### Rules
|
|
191
159
|
|
|
192
160
|
- **Never** commit long-lived model: in shared Trellis templates or team repo defaults.
|
|
193
161
|
- **Never** inject model IDs via hooks (inject-subagent-context.py stays task-only).
|
|
194
162
|
- **Do not** attempt ephemeral model overlay under BYOK — it silently fails for routing (Method 4).
|
|
195
|
-
- **Do not** rely on Cursor Settings per `cstl-*` agent for BYOK routing —
|
|
196
|
-
-
|
|
163
|
+
- **Do not** rely on Cursor Settings per `cstl-*` agent for BYOK routing — inherit, BYOK env override, or Method 3.
|
|
164
|
+
- **Do not** apply Cursor++ `extension.js` patches, `patch_wpelc8.py`, or `cstl-cursor2plus-setup`. Those paths are retired.
|
|
197
165
|
- **Do not** assume Explore subagent can replace cstl-research for all scenarios — it is read-only and cannot persist files.
|
|
198
166
|
- Workflow and skills **must not** hardcode vendor model IDs.
|
|
199
167
|
|
|
200
168
|
### Child worker
|
|
201
169
|
|
|
202
|
-
- **Default
|
|
170
|
+
- **Default:** Parent session dispatches **Task** `cstl-implement` with prompt from `generate-child-prompt --mode subagent`; model inherits parent (Native overlay Method 4 when applicable).
|
|
203
171
|
- **Exception:** User or `child-prompts.md` names a child for **separate writable Agent** → new chat, manual model, paste prompt (Method 3).
|
|
204
172
|
- **Native API:** ephemeral overlay on `cstl-implement` (Method 4) still valid.
|
|
205
173
|
|
|
206
174
|
### Technical note
|
|
207
175
|
|
|
208
|
-
Client layer still only builds override rows for built-in types such as `explore`. Cursor Settings entries for custom agent **names** do not reach
|
|
176
|
+
Client layer still only builds override rows for built-in types such as `explore`. Cursor Settings entries for custom agent **names** do not reliably reach custom `cstl-*` Task types. **Method 3** bypasses Task routing (user picks model in a new chat). Historical Cursor++ resolver-map evidence lives in the appendix — not a current control plane.
|
|
209
177
|
|
|
210
178
|
---
|
|
211
179
|
|
|
180
|
+
## Trellis workflow: using per-agent models (Native / BYOK env)
|
|
212
181
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
Operational contract between the Trellis task ladder and Cursor++ BYOK.
|
|
182
|
+
Operational contract between the Trellis task ladder and Cursor model routing.
|
|
216
183
|
|
|
217
184
|
### Roles and who picks the model
|
|
218
185
|
|
|
219
186
|
| Layer | Picks model for… | Mechanism |
|
|
220
187
|
| ----- | ---------------- | --------- |
|
|
221
|
-
| **You (operator)** | Main orchestration chat | Cursor model picker
|
|
222
|
-
| **You (operator)** | `cstl-research` / `cstl-implement` / `cstl-check`
|
|
223
|
-
| **You (operator)** | `explore` |
|
|
188
|
+
| **You (operator)** | Main orchestration chat | Cursor model picker |
|
|
189
|
+
| **You (operator)** | `cstl-research` / `cstl-implement` / `cstl-check` | Inherit, Native Method 4 overlay, or Method 3 — **not** Cursor++ JSON/patch |
|
|
190
|
+
| **You (operator)** | `explore` | Native model picker |
|
|
224
191
|
| **Main Agent session** | When to spawn which agent | `workflow.md`, skills, scene matrix |
|
|
225
192
|
| **Hooks** | Never | `inject-subagent-context.py` — task context only |
|
|
226
193
|
|
|
@@ -228,39 +195,32 @@ Operational contract between the Trellis task ladder and Cursor++ BYOK.
|
|
|
228
195
|
|
|
229
196
|
1. **Select task** — `task.py select`; dispatch prompts include `Selected task: .cstl/tasks/<id>` when hooks need it.
|
|
230
197
|
2. **Main session model** — your choice for planning and orchestration.
|
|
231
|
-
3. **Research** — Task `subagent_type=cstl-research`
|
|
232
|
-
4. **Implement** — after `start-execution --approved`, Task `cstl-implement
|
|
233
|
-
5. **Check** — Task `cstl-check
|
|
198
|
+
3. **Research** — Task `subagent_type=cstl-research` (inherit or Method 4).
|
|
199
|
+
4. **Implement** — after `start-execution --approved`, Task `cstl-implement`.
|
|
200
|
+
5. **Check** — Task `cstl-check`.
|
|
234
201
|
6. **Gates / finish** — main session `record-gate`, `cstl-finish-work`.
|
|
235
202
|
|
|
236
|
-
|
|
203
|
+
Task `model: fast` does **not** override custom types under BYOK.
|
|
237
204
|
|
|
238
205
|
### When to use which method
|
|
239
206
|
|
|
240
207
|
| Setup | Research | Implement | Check |
|
|
241
208
|
| ----- | -------- | --------- | ----- |
|
|
242
|
-
|
|
|
243
|
-
|
|
|
244
|
-
|
|
|
209
|
+
| One parent model | Task (inherit) | Task (inherit) | Task (inherit) |
|
|
210
|
+
| Native; different models | Method 4 | Method 4 | Method 4 |
|
|
211
|
+
| BYOK / overlay unavailable; different models | Method 3 | Method 3 | Method 3 |
|
|
245
212
|
| Repo read-only only | Method 2 Explore | — | — |
|
|
246
213
|
|
|
247
214
|
### Parent/Child
|
|
248
215
|
|
|
249
|
-
- **Default:** Parent dispatches **Task** `cstl-implement
|
|
216
|
+
- **Default:** Parent dispatches **Task** `cstl-implement`.
|
|
250
217
|
- **Rare per-child model:** new writable Agent session when user names that child — not a separate Trellis subagent type by default.
|
|
251
218
|
- Parent retains `review-child` / `integrate-child`; serial integration and worktree rules unchanged.
|
|
252
219
|
|
|
253
|
-
### Maintainer checklist (BYOK)
|
|
254
|
-
|
|
255
|
-
1. Resolve slugs in `~/.ccursor/providers.json` (or path in `config.local.json`).
|
|
256
|
-
2. Edit user and/or project JSON maps; include `generalPurpose`, `shell`, `best-of-n-runner` if you use those Task types.
|
|
257
|
-
3. Run `patch_wpelc8.py` from `.cstl/local/cursor2plus/` → Reload Window.
|
|
258
|
-
4. Re-apply after Cursor / Cursor++ upgrades.
|
|
259
|
-
|
|
260
220
|
### What stays in the Trellis repo
|
|
261
221
|
|
|
262
222
|
- `.cursor/agents/cstl-*.md` — no committed `model:`; link to this policy.
|
|
263
|
-
- Skills/workflow — **which** agent to spawn, not
|
|
223
|
+
- Skills/workflow — **which** agent to spawn, not vendor slugs.
|
|
264
224
|
|
|
265
225
|
---
|
|
266
226
|
|
|
@@ -273,13 +233,13 @@ Optional team paste (comments only — not Cursor product settings):
|
|
|
273
233
|
|
|
274
234
|
```yaml
|
|
275
235
|
model_policy: cursor-configured
|
|
276
|
-
dispatch_model:
|
|
236
|
+
dispatch_model: inherit_or_native_overlay_or_manual
|
|
277
237
|
child_worker:
|
|
278
238
|
mode: separate_writable_agent_session
|
|
279
239
|
explore_subagent:
|
|
280
|
-
model: independent #
|
|
240
|
+
model: independent # Native picker
|
|
281
241
|
trellis_task_subagents:
|
|
282
|
-
model:
|
|
242
|
+
model: inherit # Native Method 4 overlay optional; Cursor++ map retired
|
|
283
243
|
```
|
|
284
244
|
|
|
285
245
|
---
|
|
@@ -311,6 +271,7 @@ trellis_task_subagents:
|
|
|
311
271
|
- Do not spawn `cstl-implement` from inside `cstl-implement` (recursion guard in agent defs).
|
|
312
272
|
- Do not spawn a subagent for PRD Grill — use brainstorm Phase B + micro-grill contract.
|
|
313
273
|
- Do not leave `model:` on agent files after dispatch (always restore).
|
|
274
|
+
- Do not treat Cursor++ / `cstl-cursor2plus-setup` / Method 2.5 as a current option.
|
|
314
275
|
|
|
315
276
|
---
|
|
316
277
|
|
|
@@ -330,43 +291,18 @@ This command is **Agent-facing** — not listed in user README or slash command
|
|
|
330
291
|
|
|
331
292
|
When `preToolUse` cannot resolve a selected task, the subagent should read **`Selected task:`** from the first line of its dispatch prompt, then load `implement.jsonl` / `check.jsonl`, `prd.md`, `design.md`, and `implement.md` manually. Trellis does **not** document or depend on Cursor `/multitask` for workflow orchestration.
|
|
332
293
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
[Cursor++](https://ccursor.cometix.dev) (ccursor by cometix) is a third-party Patch that intercepts Cursor API traffic via a local server (`127.0.0.1:39831`). It does **not** modify `.cursor/` files — it intercepts at the API/gRPC layer (`AgentService/RunSSE`, `AvailableModels`, etc.) and routes requests to BYOK providers.
|
|
336
|
-
|
|
337
|
-
### Confirmed compatibility (v0.0.11+, Cursor 3.7.27)
|
|
338
|
-
|
|
339
|
-
| Trellis component | Status under Cursor++ | Notes |
|
|
340
|
-
| --------------------- | --------------------- | ----------------------------------------------------------------------------------- |
|
|
341
|
-
| `.cursor/agents/` | Normal | Agent files not intercepted; `model:` frontmatter read by Cursor at spawn |
|
|
342
|
-
| `.cursor/hooks/` | Normal | Hook config loads; verify `hooksConfig` in agent logs when debugging |
|
|
343
|
-
| `.cursor/mcp.json` | Normal | MCP servers and tools load normally |
|
|
344
|
-
| SubAgent write access | **Fixed in v0.0.11** | Prior versions defaulted SubAgent to readonly; `cstl-implement` now writes files |
|
|
345
|
-
|
|
346
|
-
**Minimum version: v0.0.11.** Earlier versions break `cstl-implement` due to SubAgent readonly bug.
|
|
347
|
-
|
|
348
|
-
### Model routing under BYOK (verified 2026-06-18)
|
|
349
|
-
|
|
350
|
-
- **Explore subagent:** Independent model selection works via Cursor++ panel (v0.0.11+). Cursor++ intercepts and routes the selected BYOK model for Explore-type requests.
|
|
351
|
-
- **Custom Task subagents:** Frontmatter `model:` and Cursor Settings per-agent names are **not** applied for `cstl-*` BYOK routing. Use **Method 2.5** or **Method 3**. **Explore** uses Cursor++ panel.
|
|
352
|
-
- The `model:` ID **must match** a model configured in Cursor++ provider settings (`~/.ccursor/providers.json`). If it doesn't match, the request will fail with a provider error.
|
|
353
|
-
- Cursor++ intercepts `AvailableModels`/`GetDefaultModel` - the model picker and model list are determined by BYOK provider config, not Cursor's official model catalog.
|
|
354
|
-
- Under Cursor++, "inherit" means the parent session's BYOK-routed model, which may differ from what the Cursor UI label suggests.
|
|
294
|
+
---
|
|
355
295
|
|
|
356
|
-
|
|
296
|
+
## Historical appendix — Cursor++ Method 2.5 / 2.6 (retired; not SOP)
|
|
357
297
|
|
|
358
|
-
|
|
359
|
-
- API keys are stored in **plaintext** in `~/.ccursor/providers.json` — restrict file permissions (`chmod 600` / Windows ACL).
|
|
360
|
-
- Cursor++ stores rules in `~/.ccursor/knowledge-base.json`, independent of `.cursor/rules/` and Trellis rules.
|
|
361
|
-
- Version updates lag behind Cursor releases — after a Cursor update, BYOK routing may break until Cursor++ catches up. Trellis hooks/agents/skills survive the window (they don't depend on API routing).
|
|
362
|
-
- Do not mix Cursor++ BYOK sessions with Cursor official sessions — they cannot be continued across each other.
|
|
363
|
-
- Cursor++ may violate Cursor ToS; use at own risk. Not recommended for enterprise/compliance environments.
|
|
298
|
+
**Do not follow this appendix as an operator runbook.** It records what existed so archive evidence stays findable.
|
|
364
299
|
|
|
365
|
-
|
|
300
|
+
- **What it was:** A reversible patch to a third-party Cursor++ `extension.js` subagent-model resolver (historical symbol `WPeLc8`, later `ZiKp4I`) mapping `subagentType` → catalog slug before inherit-parent. Operator maps lived in `~/.ccursor/trellis-task-models.json5` and project json5; apply required Reload Window.
|
|
301
|
+
- **Where the dead files are:** `.cstl/local/archive/cursor2plus/`, `.cstl/local/archive/cursor2plus_bundle_src/`, archived `subagent-models.json5`. Reverse-engineering notes: `.cstl/spec/guides/cursor-subagent-reverse-engineering-report.md` (also retired).
|
|
302
|
+
- **Why it is not current:** User retired Cursor++ (2026-08-19). `cstl-cursor2plus-setup` and live `.cstl/local/cursor2plus/` were removed from the Trellis SSOT (P23). Product path = Native Cursor.
|
|
303
|
+
- **Do not:** run `patch_wpelc8.py`, copy archive back into `.cstl/local/cursor2plus/`, invoke `cstl init --cursor2plus`, or use a Cursor++ panel as the Trellis model control plane.
|
|
366
304
|
|
|
367
|
-
|
|
368
|
-
- Do not assume Cursor official model IDs work under BYOK — use model IDs from your provider config.
|
|
369
|
-
- Do not mix Cursor++ and Cursor official sessions for the same conversation.
|
|
305
|
+
---
|
|
370
306
|
|
|
371
307
|
## Worktree template
|
|
372
308
|
|
|
@@ -388,7 +324,7 @@ For multi-package workspaces, list all install commands needed after a fresh che
|
|
|
388
324
|
|
|
389
325
|
- `.cursor/agents/cstl-research.md`, `cstl-implement.md`, `cstl-check.md`
|
|
390
326
|
- `.cursor/agents/.cstl-model-overlay.local.md` — optional overlay audit stub (native API)
|
|
391
|
-
-
|
|
327
|
+
- `.cstl/local/archive/` — retired Cursor++ bundle (not a runtime dependency)
|
|
392
328
|
- `.cstl/workflow.md` — Task Ladder + Parent orchestration
|
|
393
329
|
- [Cursor Subagents](https://cursor.com/docs/subagents) — `model: inherit | <id>`
|
|
394
330
|
- [Cursor Multitask changelog](https://cursor.com/changelog/04-24-26) — `/multitask`, Worktrees, Multi-root Workspaces
|