@blxzer/cursor-trellis 0.4.1 → 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 +49 -0
- package/README.md +25 -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 +144 -41
- 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 +12 -45
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/constants/paths.d.ts +13 -0
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +17 -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-check/SKILL.md +1 -1
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/hooks-and-settings.md +2 -2
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/overview.md +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 +6 -5
- 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/common/skills/brainstorm.md +2 -2
- package/dist/templates/cursor/agents/cstl-check.md +2 -2
- package/dist/templates/cursor/agents/cstl-implement.md +1 -1
- package/dist/templates/cursor/agents/cstl-research.md +2 -2
- 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 +36 -3
- package/dist/templates/markdown/{spec/guides → framework}/cursor-native-modes-guide.md.txt +13 -10
- package/dist/templates/markdown/{spec/guides → framework}/cursor-subagent-policy.md.txt +63 -127
- package/dist/templates/markdown/framework/dogfood-only-surfaces.md.txt +29 -0
- package/dist/templates/markdown/{spec/guides → framework}/execution-strategy.md.txt +2 -0
- package/dist/templates/markdown/framework/index.md.txt +31 -0
- package/dist/templates/markdown/framework/internal-skills-cursor-reachability.md.txt +45 -0
- 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/prd-grill-frontier.md.txt +83 -0
- package/dist/templates/markdown/framework/release-boundary.md.txt +30 -0
- package/dist/templates/markdown/{spec/guides → framework}/retrieval-daily-guide.md.txt +1 -1
- package/dist/templates/markdown/framework/upgrade.md.txt +15 -0
- package/dist/templates/markdown/{spec/guides → framework}/verification-strength-guide.md.txt +2 -2
- package/dist/templates/markdown/index.d.ts +26 -10
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +87 -11
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/markdown/prompts/run-semantic-slice-12.md.txt +1 -1
- package/dist/templates/markdown/spec/guides/index.md.txt +5 -19
- package/dist/templates/markdown/spec/guides/prototype-guide.md.txt +10 -10
- package/dist/templates/markdown/spec/guides/test-discipline-guide.md.txt +1 -1
- 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 +19 -2
- package/dist/templates/trellis/CONTEXT.md +63 -3
- package/dist/templates/trellis/config.yaml +1 -1
- 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 +293 -61
- 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_observable_defaults.py +10 -4
- 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/cursor_retrieval_probe_prompt.md +4 -5
- 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 +109 -23
- 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/retrieval-execution-telemetry.js +1 -1
- package/dist/utils/retrieval-execution-telemetry.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/markdown/spec/guides/cursor-trellis-release-coexistence-guide.md.txt +0 -166
- package/dist/templates/markdown/spec/guides/goal-release-regression-runbook.md.txt +0 -132
- 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
- /package/dist/templates/markdown/{spec/guides → framework}/artifact-locale-guide.md.txt +0 -0
- /package/dist/templates/markdown/{spec/guides → framework}/cursor-context-injection-guide.md.txt +0 -0
- /package/dist/templates/markdown/{spec/guides → framework}/cursor-semantic-compliance.md.txt +0 -0
- /package/dist/templates/markdown/{spec/guides → framework}/injection-budget-guide.md.txt +0 -0
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Trellis codebase retrieval on Cursor — follow router-derived plans; Rules are the primary injection channel (not sessionStart hooks)"
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Codebase retrieval routing (Cursor)
|
|
7
|
-
|
|
8
|
-
Before answering **code-location / architecture / caller-chain / config-schema** questions in this repo, use the retrieval layer deliberately. On Cursor, **`.cursor/rules` is the reliable per-turn policy channel**; the **`beforeSubmitPrompt`** hook (`.cursor/hooks/inject-retrieval-plan.py`) runs **telemetry-only** — it does **not** inject `## 代码库检索计划` blocks. Generate a plan via `route_codebase_retrieval.py --instructions` when needed, or follow the default tool order below. Do **not** depend on end-of-turn retrieval-pack hooks for plans.
|
|
9
|
-
|
|
10
|
-
## Prefer / Adapt / Own (code intelligence)
|
|
11
|
-
|
|
12
|
-
**Three surfaces (do not conflate):** (1) **IDE Editor** — full extension LSP; (2) **Agents Window (Glass)** — staff-reported partial LSP vs Editor ([forum](https://forum.cursor.com/t/cursor-agents-window-lsp-not-working-with-typescript/156772)); (3) **Agent autonomous tools** — [official list](https://cursor.com/docs/agent/overview.md) is search/read/edit/shell/web — **no** `GO_TO_DEFINITION` / raw LSP tool. Trellis routes **Agent tool table** only. See `retrieval-daily-guide.md` § Prefer/Adapt/Own evidence (2026-08-05 smart-search + Native probe).
|
|
13
|
-
|
|
14
|
-
| Need | **Prefer** (Cursor native, Agent-reachable) | **Adapt** (route by intent / `cursorEnv`) | **Own** (codegraph / MCP) |
|
|
15
|
-
| --- | --- | --- | --- |
|
|
16
|
-
| Exact literal / path | **Grep** | — | — |
|
|
17
|
-
| Named-symbol definition (known identifier) | **Grep → Read** | Path hints from semantic when file unknown | codegraph when cross-package trap, overload ambiguity, or blast context needed |
|
|
18
|
-
| Agent-session diagnostics | **ReadLints** (when in tool table) | — | — |
|
|
19
|
-
| Conceptual / how does X work | **Native:** built-in `@codebase` / semantic search (index embeddings; ≠ LSP) | **BYOK:** **fast_context_search** (fast-context MCP). Plans show `cursorEnv`. | — |
|
|
20
|
-
| Caller chain / blast radius | Grep for imports/callbacks (gap-fill) | — | **codegraph_callers** / **codegraph_explore** |
|
|
21
|
-
| Cross-package trap / extension symbol | Grep scoped by package or `extensions/` | — | **codegraph_search** / **codegraph_explore** |
|
|
22
|
-
| Raw LSP / GO_TO_DEFINITION **as Agent tool** | **Not in Agent tool table** (official docs + Native probe 2026-08-05) | IDE Editor has LSP; Agents Window may lack parity — human UI, not Agent routing | codegraph when Grep+Read insufficient |
|
|
23
|
-
|
|
24
|
-
**Rollback:** revert this rule + `retrieval-daily-guide.md` Prefer rows to the pre-P1 codegraph-first definition wording; keep codegraph MCP enabled.
|
|
25
|
-
|
|
26
|
-
## When a retrieval plan block is present
|
|
27
|
-
|
|
28
|
-
If the user message or Trellis context contains a block starting with `## 代码库检索计划` or `## Codebase retrieval plan`:
|
|
29
|
-
|
|
30
|
-
1. Execute steps **in order** before stating file paths or behavior claims.
|
|
31
|
-
2. Treat each step as mandatory tooling (not suggestions).
|
|
32
|
-
3. Finish with **Read** verification on cited sources (definition jumps: **Grep → Read** first; **codegraph** when the plan lists structural/trap routes or Grep is ambiguous).
|
|
33
|
-
|
|
34
|
-
Generate a fresh plan when needed:
|
|
35
|
-
|
|
36
|
-
```powershell
|
|
37
|
-
python ./.cstl/scripts/route_codebase_retrieval.py "<question>" --instructions
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
JSON (includes `agentInstructions`):
|
|
41
|
-
|
|
42
|
-
```powershell
|
|
43
|
-
python ./.cstl/scripts/route_codebase_retrieval.py "<question>" --json
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Default tool order (no plan block)
|
|
47
|
-
|
|
48
|
-
| Need | Tool (Cursor) |
|
|
49
|
-
| --- | --- |
|
|
50
|
-
| Exact string / path | **Grep** (Instant Grep) |
|
|
51
|
-
| Named-symbol definition | **Grep** → **Read** (Prefer native); **codegraph_explore** / **codegraph_search** when trap, overload, or blast context needed |
|
|
52
|
-
| IDE diagnostics | **ReadLints** on touched or cited files |
|
|
53
|
-
| Who calls / blast radius | **codegraph_callers** / **codegraph_explore** → Grep for imports/callbacks |
|
|
54
|
-
| Same name across packages (trap) | **codegraph_search** / **codegraph_explore** → Grep |
|
|
55
|
-
| Extension symbols | **codegraph_search** under `extensions/` |
|
|
56
|
-
| Conceptual / how does X work | **Native:** built-in `@codebase` / semantic search. **BYOK:** **fast_context_search** (fast-context MCP). Plans show `cursorEnv`. |
|
|
57
|
-
| Policy / architecture / boundaries / storage rules | **Grep** on `AGENTS.md`, `**/AGENTS.md`, `.cstl/spec/**`, `README.md` (router `policy-docs-rg`) before implementation modules |
|
|
58
|
-
| Wide cross-cutting explore | **Native:** DEEP_SEARCH or Explore subagent. **BYOK:** **Task explore** subagent, then Grep/codegraph/Read |
|
|
59
|
-
|
|
60
|
-
## Semantic on Cursor (`platform-semantic`)
|
|
61
|
-
|
|
62
|
-
- **cursorEnv native:** built-in codebase semantic search (`platformNative`). Do **not** use fast-context MCP for semantic Primary.
|
|
63
|
-
- **cursorEnv byok:** **fast-context MCP** is **required** for concept retrieval; built-in `@codebase` is not available in the agent tool list.
|
|
64
|
-
- Override detection: `TRELLIS_CURSOR_BYOK=0|1` or `~/.ccursor/routes.json` `byokMode`.
|
|
65
|
-
|
|
66
|
-
## Result-layer ranking (B / E / D)
|
|
67
|
-
|
|
68
|
-
When the plan block includes **结果层排序**, apply it **after** collecting path candidates and **before** stating Top-1 / Top-5: caller concrete sites over assembly files; trap demotion; env scripts/e2e/bench over generic `src/auth`/`paths`. Offline reorder: `rank_retrieval_candidates.py`.
|
|
69
|
-
|
|
70
|
-
## codegraph-only value (Own layer)
|
|
71
|
-
|
|
72
|
-
Use codegraph for **call chains**, **cross-package trap disambiguation**, **extension symbol resolution**, **impact/blast radius**, and **definition/reference when native Grep+Read is ambiguous** — not for pure literal search (Grep), simple single-package definition jump (Grep+Read), BYOK concept Primary (use fast-context), Agent diagnostics (ReadLints), or **replacing IDE Editor LSP** (human surface).
|
|
73
|
-
|
|
74
|
-
**Re-probe gate:** Before elevating raw LSP to Prefer, verify Agent tool table + `retrieval-daily-guide.md` evidence notes; if external docs add LSP tools but Native probe fails, **keep fallback** and document the gap.
|
|
75
|
-
|
|
76
|
-
## External facts
|
|
77
|
-
|
|
78
|
-
Web/current events: **smart-search** first per `.cstl/spec/guides/retrieval-daily-guide.md` (see **External-knowledge gate** for search-or-not).
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
# cursor-trellis Release & Coexistence Guide
|
|
2
|
-
|
|
3
|
-
> **Audience**: Maintainers and agents working on `@blxzer/cursor-trellis` in `D:\MyHarness\cursor-trellis`.
|
|
4
|
-
> **Scope**: npm publish runbook, git tag naming (`cstl-v*`), and upstream Trellis coexistence semantics (0.3.2+).
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## 1. npm publish runbook (mandatory)
|
|
9
|
-
|
|
10
|
-
cursor-trellis ships **two** npm packages at the **same version**:
|
|
11
|
-
|
|
12
|
-
| Package | Role |
|
|
13
|
-
| --- | --- |
|
|
14
|
-
| `@blxzer/cursor-trellis-core` | SDK (must publish **first**) |
|
|
15
|
-
| `@blxzer/cursor-trellis` | CLI (depends on core) |
|
|
16
|
-
|
|
17
|
-
### Do
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
cd D:\MyHarness\cursor-trellis\packages\cli
|
|
21
|
-
|
|
22
|
-
# 1. Version parity (cli + core package.json must match)
|
|
23
|
-
cd ../.. && pnpm release:check
|
|
24
|
-
|
|
25
|
-
# 2. Optional: dry-run pack shape (rewrites workspace:* in tarball)
|
|
26
|
-
node packages/cli/scripts/publish-packages.js --dry-run
|
|
27
|
-
|
|
28
|
-
# 3. Publish both packages in dependency order
|
|
29
|
-
node packages/cli/scripts/publish-packages.js
|
|
30
|
-
|
|
31
|
-
# 4. Verify registry visibility
|
|
32
|
-
node packages/cli/scripts/release-preflight.js verify-npm --package all
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
`publish-packages.js` uses **`pnpm publish`** (not bare `npm publish`). pnpm rewrites `workspace:*` dependencies to the resolved semver (e.g. `"@blxzer/cursor-trellis-core": "0.3.3"`). Bare `npm publish` leaves `workspace:*` in the tarball → **`EUNSUPPORTEDPROTOCOL`** on install.
|
|
36
|
-
|
|
37
|
-
### Do not
|
|
38
|
-
|
|
39
|
-
- **`npm publish`** from `packages/cli` alone (0.3.1 incident: cli tarball had `workspace:*`, core was missing).
|
|
40
|
-
- Publish cli before core (cli install fails with ETARGET until core exists).
|
|
41
|
-
- Skip `prepublishOnly` (runs test + build + copy-release-assets on cli).
|
|
42
|
-
|
|
43
|
-
### Preflight commands
|
|
44
|
-
|
|
45
|
-
| Command | Purpose |
|
|
46
|
-
| --- | --- |
|
|
47
|
-
| `release-preflight.js check-versions` | cli/core version match |
|
|
48
|
-
| `release-preflight.js verify-packed-cli` | Packed cli resolves core to exact semver (not `workspace:*`) |
|
|
49
|
-
| `release-preflight.js verify-npm` | Post-publish registry check |
|
|
50
|
-
| `release-preflight.js publish-plan` | Idempotent CI plan (skip already-published versions) |
|
|
51
|
-
|
|
52
|
-
### Withdrawn / deprecated versions
|
|
53
|
-
|
|
54
|
-
- **0.3.1 cli**: withdrawn (unpublish); use **0.3.2+**.
|
|
55
|
-
- **0.3.1 core**: cannot unpublish (npm policy); **`npm deprecate`** applied — use `@latest`.
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## 2. Git tags (`cstl-v*` prefix)
|
|
60
|
-
|
|
61
|
-
This repo shares git history with legacy `@blxzer/trellis` (1.x). Old tags `v0.3.x`–`v0.6.x` point at **trellis** commits, not cursor-trellis releases.
|
|
62
|
-
|
|
63
|
-
| Tag pattern | Product | Example |
|
|
64
|
-
| --- | --- | --- |
|
|
65
|
-
| `v*` (legacy) | `@blxzer/trellis` | `v0.3.2` @ 2026-03 trellis commit |
|
|
66
|
-
| **`cstl-v*`** | `@blxzer/cursor-trellis` | `cstl-v0.3.2` @ cursor-trellis release commit |
|
|
67
|
-
|
|
68
|
-
`packages/cli/scripts/release.js` tags releases as **`cstl-v${version}`** (since 0.3.2 tag-hygiene commit).
|
|
69
|
-
|
|
70
|
-
`release-preflight tagVersionFromEnv` extracts semver from tag suffix (`cstl-v0.3.2` → `0.3.2`).
|
|
71
|
-
|
|
72
|
-
**CI publish workflow** (`.github/workflows/publish.yml`): triggers on `push.tags: cstl-v*`. Requires repo secret `NPM_TOKEN`.
|
|
73
|
-
|
|
74
|
-
Do **not** delete legacy `v*` tags — they are historical trellis releases.
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## 3. Coexistence with upstream mindfold-ai/Trellis
|
|
79
|
-
|
|
80
|
-
**Product decision**: Both are workflow frameworks. **Cursor configuration belongs to cursor-trellis**. Upstream Trellis keeps `.trellis/` and non-Cursor platform dirs; cursor-trellis uses `.cstl/` + `.cursor/cstl-*`.
|
|
81
|
-
|
|
82
|
-
### Scenario matrix
|
|
83
|
-
|
|
84
|
-
| Scenario | User state | Action |
|
|
85
|
-
| --- | --- | --- |
|
|
86
|
-
| 1 Pure cstl | Only cursor-trellis (legacy `.trellis/` runtime) | `cstl update --migrate` → rename `.trellis/` → `.cstl/` |
|
|
87
|
-
| 2 Coexistence | Upstream `.trellis/` + wants Cursor cstl | `cstl init --cursor` → creates `.cstl/`, **takes over `.cursor/`**, AGENTS dual-block |
|
|
88
|
-
| 3 Fresh | Never used either | `cstl init --cursor` → `.cstl/` only |
|
|
89
|
-
|
|
90
|
-
### `cstl init` coexistence mode
|
|
91
|
-
|
|
92
|
-
When `.trellis/` exists and `.cstl/` does not:
|
|
93
|
-
|
|
94
|
-
1. Creates `.cstl/` (does not touch `.trellis/`).
|
|
95
|
-
2. **Force-writes** `.cursor/` (hooks, rules, commands) even under `-y`.
|
|
96
|
-
3. **AGENTS.md dual-block**: preserves `<!-- TRELLIS:START -->`, adds/refreshes `<!-- CSTL:START -->` (`insertCstlManagedBlock`).
|
|
97
|
-
4. Prints banner: do **not** run `cstl update --migrate` (would rename upstream `.trellis/`).
|
|
98
|
-
|
|
99
|
-
### Migrate gate (`assessCstlDirectoryMigrate`)
|
|
100
|
-
|
|
101
|
-
Conservative by default for `.trellis/` → `.cstl/` rename:
|
|
102
|
-
|
|
103
|
-
| Signal | Meaning |
|
|
104
|
-
| --- | --- |
|
|
105
|
-
| F1 | `.cursor/commands/cstl-*.md` |
|
|
106
|
-
| F2 | `.cursor/rules/cstl-triage.mdc` |
|
|
107
|
-
| F3 | `.trellis/scripts/common/cli_adapter.py` contains `cstl` |
|
|
108
|
-
| U1 | `.claude/agents/trellis-implement.md` |
|
|
109
|
-
| U2 | Non-Cursor platform `trellis-*` agents/skills |
|
|
110
|
-
| U4 | `.cursor/commands/trellis-*.md` without cstl fingerprint |
|
|
111
|
-
|
|
112
|
-
- No F fingerprint → **abort** (protect scenario 2).
|
|
113
|
-
- F + U mixed → **abort** (manual split).
|
|
114
|
-
- Escape: `cstl update --force-cstl-migrate`.
|
|
115
|
-
|
|
116
|
-
### AGENTS.md hash tracking (block-level)
|
|
117
|
-
|
|
118
|
-
`.template-hashes.json` stores **CSTL block hash only** for `AGENTS.md`, not the whole file. Upstream edits to TRELLIS block or user content outside CSTL block do **not** trigger "modified" on `cstl update`.
|
|
119
|
-
|
|
120
|
-
Implementation: `template-hash.ts` → `hashContentForPath` + `extractBlock(CSTL:START/END)`.
|
|
121
|
-
|
|
122
|
-
### `cstl uninstall` in coexistence repos
|
|
123
|
-
|
|
124
|
-
- Strips **CSTL block only** (`removeCstlManagedBlock`); keeps TRELLIS block + user content.
|
|
125
|
-
- If file was only the CSTL block → deletes `AGENTS.md`.
|
|
126
|
-
- Does **not** restore upstream `.cursor/` files overwritten during init (by design: cstl owned Cursor).
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## 4. Post-release dogfood checklist
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
npm install -g @blxzer/cursor-trellis@latest
|
|
134
|
-
cstl --version
|
|
135
|
-
|
|
136
|
-
# Each dogfood project (no --migrate unless upgrading from pre-0.3.1):
|
|
137
|
-
cd <project>
|
|
138
|
-
cstl update --skip-readiness --skip-all
|
|
139
|
-
# Confirm .cstl/.version matches npm latest
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Sandbox smoke (from empty dir):
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
npm init -y && npm install @blxzer/cursor-trellis@latest
|
|
146
|
-
npx cstl init --yes --skip-readiness --cursor
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## 5. Related files (source of truth)
|
|
152
|
-
|
|
153
|
-
| Topic | Path |
|
|
154
|
-
| --- | --- |
|
|
155
|
-
| Publish orchestration | `cursor-trellis/packages/cli/scripts/publish-packages.js` |
|
|
156
|
-
| Release preflight | `cursor-trellis/packages/cli/scripts/release-preflight.js` |
|
|
157
|
-
| Tag prefix | `cursor-trellis/packages/cli/scripts/release.js` |
|
|
158
|
-
| Coexistence init | `packages/cli/src/commands/init.ts` |
|
|
159
|
-
| Migrate gate | `packages/cli/src/utils/workflow-ownership.ts` |
|
|
160
|
-
| AGENTS helpers | `packages/cli/src/utils/agents-md.ts` |
|
|
161
|
-
| Block-level hash | `packages/cli/src/utils/template-hash.ts` |
|
|
162
|
-
| Uninstall strip | `packages/cli/src/commands/uninstall.ts` |
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
**Last updated**: 2026-07-04 (0.3.3 follow-up: uninstall CSTL strip + block hash + this guide).
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# Goal 发布回归 Runbook
|
|
2
|
-
|
|
3
|
-
> **受众**:Root npm 闸、Parent 集成前自检、维护者。
|
|
4
|
-
> **范围**:`cstl goal` 回归 checklist — **不扩展 Goal 功能**,仅钉死 hardening 命令。
|
|
5
|
-
> **基线**:`cursor-trellis` `main`(A1/A2 合并后 tip);harness 侧 `.cstl/spec/Trellis/framework/cstl-goal-*.md`。
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 1. 发布门语义
|
|
10
|
-
|
|
11
|
-
| 项 | 说明 |
|
|
12
|
-
| --- | --- |
|
|
13
|
-
| **用途** | npm 发布前 Goal 回归闸;Parent `verify.md` 可链接本页 |
|
|
14
|
-
| **非目标** | 不新增 runner/worker 能力;不替代 [cursor-trellis release runbook](./cursor-trellis-release-coexistence-guide.md) |
|
|
15
|
-
| **通过标准** | Mock 路径全绿(§2);Live 路径(§3)为可选加分项 |
|
|
16
|
-
| **零功能 diff** | 本闸仅文档与命令;**不得**附带 `cursor-trellis/packages/cli/src/goal/*` 语义变更 |
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## 2. Mock 路径(必须 — 无需 `CURSOR_API_KEY`)
|
|
21
|
-
|
|
22
|
-
在 harness 根目录执行。CI / 新人 onboarding 至少跑完本节。
|
|
23
|
-
|
|
24
|
-
### 2.1 全量 Goal 测试
|
|
25
|
-
|
|
26
|
-
```powershell
|
|
27
|
-
cd cursor-trellis/packages/cli
|
|
28
|
-
pnpm test goal/
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
**期望:** 7 个 test files、32 tests 全部 PASS。
|
|
32
|
-
|
|
33
|
-
### 2.2 Golden + 墙单元测试
|
|
34
|
-
|
|
35
|
-
```powershell
|
|
36
|
-
cd cursor-trellis/packages/cli
|
|
37
|
-
pnpm exec vitest run test/goal/reviewer-golden.test.ts test/goal/walls.test.ts
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
**期望:**
|
|
41
|
-
|
|
42
|
-
- `mis-allow gate is zero on hard-deny bucket` 通过
|
|
43
|
-
- `walls.test.ts` 墙钟逻辑通过
|
|
44
|
-
|
|
45
|
-
### 2.3 墙 smoke 脚本语法
|
|
46
|
-
|
|
47
|
-
```powershell
|
|
48
|
-
python -m py_compile .cstl/scripts/goal_wall_smoke.py
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### 2.4 可选 — 墙钟 crash 可复现 smoke
|
|
52
|
-
|
|
53
|
-
需已有 goal run 目录(`goal_id` 来自历史 hardening 或本地狗粮):
|
|
54
|
-
|
|
55
|
-
```powershell
|
|
56
|
-
python ./.cstl/scripts/goal_wall_smoke.py <goal_id> --mode window --json
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
**期望:** JSON 中 `ok: true`;`audit.log` 含 `wall-clock reached`。
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## 3. Live 路径(可选 — 需要 `CURSOR_API_KEY`)
|
|
64
|
-
|
|
65
|
-
仅当维护者显式同意 live SDK 狗粮时执行。Cursor Agent shell **默认不继承** User 级环境变量,须先加载:
|
|
66
|
-
|
|
67
|
-
```powershell
|
|
68
|
-
$env:CURSOR_API_KEY = [Environment]::GetEnvironmentVariable('CURSOR_API_KEY','User')
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### 3.1 Preflight → Accept → Run
|
|
72
|
-
|
|
73
|
-
```powershell
|
|
74
|
-
cstl goal preflight --goal "..." --json
|
|
75
|
-
cstl goal accept <goal_id>
|
|
76
|
-
cstl goal run <goal_id> --max-steps 1 --json
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
CI 风格可用 mock worker(无需 live SDK):
|
|
80
|
-
|
|
81
|
-
```powershell
|
|
82
|
-
cstl goal run <goal_id> --mock-worker --max-steps 1 --json
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
若全局 `cstl` 未 link 最新 dist,改用本地 CLI:
|
|
86
|
-
|
|
87
|
-
```powershell
|
|
88
|
-
node cursor-trellis/packages/cli/dist/cli/index.js goal preflight --goal "..." --json
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
## 4. 契约引用
|
|
94
|
-
|
|
95
|
-
回归失败时对照合同,勿在发布闸中改语义:
|
|
96
|
-
|
|
97
|
-
| 文档 | 路径 |
|
|
98
|
-
| --- | --- |
|
|
99
|
-
| cstl-goal 验收合同 | [`.cstl/spec/Trellis/framework/cstl-goal-contract.md`](../Trellis/framework/cstl-goal-contract.md) |
|
|
100
|
-
| Action Packet | [`.cstl/spec/Trellis/framework/cstl-goal-action-packet.md`](../Trellis/framework/cstl-goal-action-packet.md) |
|
|
101
|
-
| Golden 用例 | `cursor-trellis/packages/cli/test/fixtures/goal-reviewer-golden/cases.json` |
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## 5. SDK 残余风险(须诚实记录)
|
|
106
|
-
|
|
107
|
-
| 来源 | 结论 |
|
|
108
|
-
| --- | --- |
|
|
109
|
-
| `@cursor/sdk` `Agent.prompt` | `sdk-client.ts` 包装为**单次** `Promise`,**无** mid-run cancel / abort 参数 |
|
|
110
|
-
| Goal SDK worker | `worker.ts` 仅外层 `withTimeout(..., ctx.timeoutMs)` |
|
|
111
|
-
| smart-search docs 探针(2026-08-07) | 未发现官方 mid-run cancel API — **按 timeout-only 风险处理** |
|
|
112
|
-
|
|
113
|
-
**实践建议:**
|
|
114
|
-
|
|
115
|
-
- Live 回归控制 `--max-steps` 与 wall 配置
|
|
116
|
-
- 长步无法保证 turn 中途取消;超时后进程可能仍占用资源直至 Promise settle
|
|
117
|
-
- 无 key 环境一律用 `--mock-worker` 或 §2 Mock 路径
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
|
-
## 6. 快速 Checklist
|
|
122
|
-
|
|
123
|
-
- [ ] `pnpm test goal/` — 32 PASS
|
|
124
|
-
- [ ] `reviewer-golden.test.ts` + `walls.test.ts` — PASS
|
|
125
|
-
- [ ] `python -m py_compile .cstl/scripts/goal_wall_smoke.py` — OK
|
|
126
|
-
- [ ] (可选)`goal_wall_smoke.py <goal_id> --mode window --json` — `ok: true`
|
|
127
|
-
- [ ] (可选 live)`cstl goal preflight` / `accept` / `run --max-steps 1`
|
|
128
|
-
- [ ] **无** `cursor-trellis/packages/cli/src/goal/*` 功能 diff
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
**来源:** `08-06-cstl-p2-goal-hardening/verify.md` · Parent `08-07-cstl-parent-orch-visibility` §5.2
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# Cursor++ Local Bundle
|
|
2
|
-
|
|
3
|
-
> **Native Cursor users:** safe to ignore or delete this directory unless using **Cursor++ BYOK** on **this repo**.
|
|
4
|
-
|
|
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.
|
|
8
|
-
|
|
9
|
-
## Bundle files
|
|
10
|
-
|
|
11
|
-
| File | Purpose |
|
|
12
|
-
|------|---------|
|
|
13
|
-
| `patch_wpelc8.py` | Operator CLI: dry-run map, compat check, apply (with `--approve`), revert |
|
|
14
|
-
| `smoke.py` | Health smoke: env, patch status, configured roles (no secret reads) |
|
|
15
|
-
| `trellis_task_models_config.py` | JSON5 + providers catalog resolver (used by patch) |
|
|
16
|
-
| `config.local.json.example` | Optional paths (`extensionJs`, `ccursorHome`, …) |
|
|
17
|
-
| `config.local.json` | Your local paths (gitignored; never commit secrets) |
|
|
18
|
-
|
|
19
|
-
User-wide model doc: `~/.ccursor/trellis-task-models.json5` (see `../trellis-task-models.json5.example`). Project override: `../subagent-models.json` (optional).
|
|
20
|
-
|
|
21
|
-
## Compatibility window
|
|
22
|
-
|
|
23
|
-
- **Verified:** Cursor **3.7.27** / Cursor++ **v0.0.11** (see `.cstl/spec/guides/cursor-subagent-policy.md`, 2026-06-18)
|
|
24
|
-
- **Re-verify** after any Cursor or Cursor++ upgrade: `python patch_wpelc8.py --check-compat`
|
|
25
|
-
- If `--check-compat` reports `fail` or `unknown`, treat the patch as stale until you re-apply or revert
|
|
26
|
-
|
|
27
|
-
## Method 2.5 workflow
|
|
28
|
-
|
|
29
|
-
1. **Dry-run map** — `python patch_wpelc8.py --print-map` (no file writes)
|
|
30
|
-
2. **Operator approval** — review map and compat output; decide to proceed
|
|
31
|
-
3. **Apply** — `python patch_wpelc8.py --apply --approve` (writes `extension.js`)
|
|
32
|
-
4. **Reload Cursor** — Developer: Reload Window (once per apply/revert)
|
|
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
|
|
34
|
-
6. **Revert if needed** — `python patch_wpelc8.py --revert` then Reload Window
|
|
35
|
-
|
|
36
|
-
Agent-led setup: run skill **`cstl-cursor2plus-setup`** in Cursor Agent (lists models, writes JSON5, runs patch steps).
|
|
37
|
-
|
|
38
|
-
## Revert recipe
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
cd .cstl/local/cursor2plus
|
|
42
|
-
python patch_wpelc8.py --revert
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Then **Developer: Reload Window**. Subagents return to **inherit parent** BYOK model. Re-apply only after `--check-compat` is `ok` and you have explicit `--approve`.
|
|
46
|
-
|
|
47
|
-
## A ≠ B verification recipe
|
|
48
|
-
|
|
49
|
-
Goal: prove the patch routes **subagent** model independently of the **parent** session model.
|
|
50
|
-
|
|
51
|
-
1. Set parent chat to model **A** (any BYOK model in Cursor++).
|
|
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**).
|
|
54
|
-
4. `python patch_wpelc8.py --apply --approve` → Reload Window.
|
|
55
|
-
5. Dispatch a `cstl-implement` Task from a parent on model **A**.
|
|
56
|
-
6. **Pass:** subagent self-report / trace shows **B** (map target), not **A**.
|
|
57
|
-
7. **Fail:** subagent shows **A** → patch stale or not applied; run `--check-compat`, re-patch, or `--revert`.
|
|
58
|
-
|
|
59
|
-
## CLI reference
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
python patch_wpelc8.py --print-map # dry-run slug map
|
|
63
|
-
python patch_wpelc8.py --check-compat # WPeLc8 locatability (no writes)
|
|
64
|
-
python patch_wpelc8.py --apply --approve # write patch (requires --approve)
|
|
65
|
-
python patch_wpelc8.py --apply --dry-run # validate without write
|
|
66
|
-
python patch_wpelc8.py --revert # remove patch
|
|
67
|
-
python patch_wpelc8.py --explain # JSON5 key meanings
|
|
68
|
-
python patch_wpelc8.py --list-models # catalog from providers.json
|
|
69
|
-
python smoke.py # env + patch_status smoke
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
`--apply` without `--approve` **refuses** and exits non-zero.
|
|
73
|
-
|
|
74
|
-
## What to put in `trellis-task-models.json5`
|
|
75
|
-
|
|
76
|
-
| JSON key (under `models`) | Meaning |
|
|
77
|
-
|---------------------------|---------|
|
|
78
|
-
| `cstl-research` | Trellis research Task subagent |
|
|
79
|
-
| `cstl-implement` | Trellis implement (+ Parent/Child default Task) |
|
|
80
|
-
| `cstl-check` | Trellis check Task subagent |
|
|
81
|
-
| `generalPurpose` / `shell` / `best-of-n-runner` | Cursor built-in Task types |
|
|
82
|
-
|
|
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.
|
|
84
|
-
|
|
85
|
-
Policy: `.cstl/spec/guides/cursor-subagent-policy.md` (Method 2.5 / 2.6).
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const cursor2plusPatchScript: string;
|
|
2
|
-
export declare const cursor2plusReadme: string;
|
|
3
|
-
export declare const cursor2plusSmokeScript: string;
|
|
4
|
-
export declare const cursor2plusConfigExample: string;
|
|
5
|
-
export declare const subagentModelsExample: string;
|
|
6
|
-
export declare const trellisTaskModelsJson5Example: string;
|
|
7
|
-
export declare const trellisTaskModelsConfigPy: string;
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/trellis/local/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,sBAAsB,QAA+B,CAAC;AACnE,eAAO,MAAM,iBAAiB,QAAyB,CAAC;AACxD,eAAO,MAAM,sBAAsB,QAAwB,CAAC;AAC5D,eAAO,MAAM,wBAAwB,QAAyC,CAAC;AAC/E,eAAO,MAAM,qBAAqB,QAA4C,CAAC;AAC/E,eAAO,MAAM,6BAA6B,QAEzC,CAAC;AACF,eAAO,MAAM,yBAAyB,QAA6C,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
|
-
import { dirname, join } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
5
|
-
function readLocal(name) {
|
|
6
|
-
return readFileSync(join(__dirname, name), "utf-8");
|
|
7
|
-
}
|
|
8
|
-
export const cursor2plusPatchScript = readLocal("patch_wpelc8.py");
|
|
9
|
-
export const cursor2plusReadme = readLocal("README.md");
|
|
10
|
-
export const cursor2plusSmokeScript = readLocal("smoke.py");
|
|
11
|
-
export const cursor2plusConfigExample = readLocal("config.local.json.example");
|
|
12
|
-
export const subagentModelsExample = readLocal("subagent-models.json.example");
|
|
13
|
-
export const trellisTaskModelsJson5Example = readLocal("trellis-task-models.json5.example");
|
|
14
|
-
export const trellisTaskModelsConfigPy = readLocal("trellis_task_models_config.py");
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/templates/trellis/local/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE1D,SAAS,SAAS,CAAC,IAAY;IAC7B,OAAO,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAC;AACnE,MAAM,CAAC,MAAM,iBAAiB,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;AACxD,MAAM,CAAC,MAAM,sBAAsB,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;AAC5D,MAAM,CAAC,MAAM,wBAAwB,GAAG,SAAS,CAAC,2BAA2B,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,qBAAqB,GAAG,SAAS,CAAC,8BAA8B,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,6BAA6B,GAAG,SAAS,CACpD,mCAAmC,CACpC,CAAC;AACF,MAAM,CAAC,MAAM,yBAAyB,GAAG,SAAS,CAAC,+BAA+B,CAAC,CAAC"}
|