@blxzer/cursor-trellis 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +51 -10
- package/README.zh-CN.md +21 -7
- package/bin/cstl.js +1 -1
- package/bin/smart-search.js +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +17 -15
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/capability-smoke.js +2 -2
- package/dist/commands/capability-smoke.js.map +1 -1
- package/dist/commands/channel/agent-loader.d.ts +1 -1
- package/dist/commands/channel/agent-loader.js +4 -4
- package/dist/commands/channel/agent-loader.js.map +1 -1
- package/dist/commands/channel/guard.d.ts +2 -2
- package/dist/commands/channel/guard.js +3 -3
- package/dist/commands/channel/guard.js.map +1 -1
- package/dist/commands/channel/index.js +3 -3
- package/dist/commands/channel/index.js.map +1 -1
- package/dist/commands/channel/list.d.ts +1 -1
- package/dist/commands/channel/list.js +1 -1
- package/dist/commands/channel/rm.d.ts +1 -1
- package/dist/commands/channel/rm.js +1 -1
- package/dist/commands/channel/store/lock.d.ts +1 -1
- package/dist/commands/channel/store/lock.js +1 -1
- package/dist/commands/channel/store/paths.js +1 -1
- package/dist/commands/channel/store/paths.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +105 -59
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/uninstall.d.ts +3 -3
- package/dist/commands/uninstall.js +10 -10
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.d.ts +6 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +83 -28
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/workflow.d.ts +4 -4
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +10 -9
- package/dist/commands/workflow.js.map +1 -1
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +1 -1
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/shared.js +6 -6
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts +4 -4
- package/dist/configurators/workflow.js +1 -1
- package/dist/constants/paths.d.ts +24 -24
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +16 -16
- package/dist/constants/paths.js.map +1 -1
- package/dist/migrations/manifests/0.3.1.json +32 -0
- package/dist/templates/common/bundled-skills/cstl-cursor2plus-setup/SKILL.md +11 -11
- package/dist/templates/common/bundled-skills/cstl-meta/SKILL.md +15 -15
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/add-project-local-conventions.md +12 -12
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-agents.md +2 -2
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-context-loading.md +21 -21
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-hooks.md +9 -9
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-skills-or-commands.md +7 -7
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-spec-structure.md +15 -15
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-task-lifecycle.md +27 -27
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-workflow.md +7 -7
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/overview.md +11 -11
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/context-injection.md +12 -12
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/generated-files.md +21 -21
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/overview.md +14 -14
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/spec-system.md +12 -12
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/task-system.md +23 -23
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/workflow.md +3 -3
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/workspace-memory.md +16 -16
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/agents.md +2 -2
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/hooks-and-settings.md +6 -6
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/overview.md +5 -5
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/platform-map.md +3 -3
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/skills-and-commands.md +5 -5
- package/dist/templates/common/bundled-skills/cstl-skill-creator/SKILL.md +2 -2
- package/dist/templates/common/bundled-skills/cstl-skill-creator/references/review-checklist.md +1 -1
- package/dist/templates/common/bundled-skills/cstl-spec-bootstrap/SKILL.md +5 -5
- package/dist/templates/common/bundled-skills/cstl-spec-bootstrap/references/repository-analysis.md +1 -1
- package/dist/templates/common/bundled-skills/cstl-spec-bootstrap/references/spec-task-planning.md +3 -3
- package/dist/templates/common/bundled-skills/cstl-spec-bootstrap/references/spec-writing.md +1 -1
- package/dist/templates/common/commands/continue.md +6 -6
- package/dist/templates/common/commands/finish-work.md +5 -5
- package/dist/templates/common/commands/start.md +8 -8
- package/dist/templates/common/skills/before-dev.md +4 -4
- package/dist/templates/common/skills/brainstorm.md +5 -5
- package/dist/templates/common/skills/break-loop.md +3 -3
- package/dist/templates/common/skills/check.md +5 -5
- package/dist/templates/common/skills/update-spec.md +4 -4
- package/dist/templates/cursor/agents/cstl-check.md +6 -6
- package/dist/templates/cursor/agents/cstl-implement.md +7 -7
- package/dist/templates/cursor/agents/cstl-research.md +9 -9
- package/dist/templates/cursor/commands/cursor2plus-setup.md +10 -10
- package/dist/templates/cursor/rules/cstl-subagent-dispatch.mdc +2 -2
- package/dist/templates/cursor/rules/cstl-triage.mdc +2 -2
- package/dist/templates/cursor/rules/retrieval-routing.mdc +4 -4
- package/dist/templates/extract.d.ts +1 -1
- package/dist/templates/extract.js +1 -1
- package/dist/templates/markdown/agents.md +11 -11
- package/dist/templates/markdown/prompts/run-semantic-slice-12.md.txt +1 -1
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +5 -5
- package/dist/templates/markdown/spec/guides/cursor-context-injection-guide.md.txt +3 -3
- package/dist/templates/markdown/spec/guides/cursor-semantic-compliance.md.txt +1 -1
- package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +11 -11
- package/dist/templates/markdown/spec/guides/durable-learning-decision-guide.md.txt +8 -8
- package/dist/templates/markdown/spec/guides/execution-strategy.md.txt +3 -3
- package/dist/templates/markdown/spec/guides/retrieval-daily-guide.md.txt +10 -10
- package/dist/templates/markdown/workspace-index.md +3 -3
- package/dist/templates/markdown/worktree.yaml.txt +1 -1
- package/dist/templates/shared-hooks/index.d.ts +1 -1
- package/dist/templates/shared-hooks/index.js +1 -1
- package/dist/templates/shared-hooks/inject-retrieval-plan.py +3 -3
- package/dist/templates/shared-hooks/inject-shell-session-context.py +7 -7
- package/dist/templates/shared-hooks/inject-subagent-context.py +1 -1
- package/dist/templates/shared-hooks/inject-workflow-state.py +11 -11
- package/dist/templates/shared-hooks/research-end-retrieval-pack.py +1 -1
- package/dist/templates/shared-hooks/session-start.py +13 -13
- package/dist/templates/trellis/config.yaml +2 -22
- package/dist/templates/trellis/index.d.ts +2 -2
- package/dist/templates/trellis/index.js +2 -2
- package/dist/templates/trellis/local/README.md +3 -3
- package/dist/templates/trellis/local/patch_wpelc8.py +4 -4
- package/dist/templates/trellis/scripts/add_session.py +20 -20
- package/dist/templates/trellis/scripts/common/active_task.py +2 -2
- package/dist/templates/trellis/scripts/common/artifact_search.py +587 -587
- package/dist/templates/trellis/scripts/common/codebase_retrieval_router.py +6 -6
- package/dist/templates/trellis/scripts/common/config.py +3 -3
- package/dist/templates/trellis/scripts/common/developer.py +2 -2
- package/dist/templates/trellis/scripts/common/packages_context.py +23 -23
- package/dist/templates/trellis/scripts/common/parent_orchestration.py +16 -16
- package/dist/templates/trellis/scripts/common/paths.py +107 -107
- package/dist/templates/trellis/scripts/common/project_file_stats.py +1 -1
- package/dist/templates/trellis/scripts/common/retrieval_agent_instructions.py +1 -1
- package/dist/templates/trellis/scripts/common/safe_commit.py +31 -31
- package/dist/templates/trellis/scripts/common/session_memory.py +360 -360
- package/dist/templates/trellis/scripts/common/smart_search_evidence.py +514 -514
- package/dist/templates/trellis/scripts/common/smart_search_resolve.py +1 -1
- package/dist/templates/trellis/scripts/common/subagent_dispatch.py +2 -2
- package/dist/templates/trellis/scripts/common/task_context.py +1 -1
- package/dist/templates/trellis/scripts/common/task_dashboard.py +140 -140
- package/dist/templates/trellis/scripts/common/task_gates.py +23 -23
- package/dist/templates/trellis/scripts/common/task_store.py +5 -5
- package/dist/templates/trellis/scripts/common/task_utils.py +3 -3
- package/dist/templates/trellis/scripts/common/tasks.py +1 -1
- package/dist/templates/trellis/scripts/common/trellis_config.py +3 -3
- package/dist/templates/trellis/scripts/common/workflow_phase.py +1 -1
- package/dist/templates/trellis/scripts/cursor_retrieval_probe.py +3 -3
- package/dist/templates/trellis/scripts/cursor_retrieval_probe_prompt.md +11 -11
- package/dist/templates/trellis/scripts/hooks/linear_sync.py +8 -8
- package/dist/templates/trellis/scripts/init_developer.py +2 -2
- package/dist/templates/trellis/scripts/retrieval_probe_matrix_template.json +4 -4
- package/dist/templates/trellis/scripts/route_codebase_retrieval.py +1 -1
- package/dist/templates/trellis/scripts/task.py +918 -918
- package/dist/templates/trellis/tasks/templates/release-readiness/implement.md +2 -2
- package/dist/templates/trellis/workflow.md +64 -64
- package/dist/types/migration.d.ts +1 -1
- package/dist/types/migration.d.ts.map +1 -1
- package/dist/utils/agents-md.d.ts +37 -0
- package/dist/utils/agents-md.d.ts.map +1 -0
- package/dist/utils/agents-md.js +82 -0
- package/dist/utils/agents-md.js.map +1 -0
- package/dist/utils/codebase-retrieval-router.js +5 -5
- package/dist/utils/codebase-retrieval-router.js.map +1 -1
- package/dist/utils/manifest-prune.d.ts +2 -2
- package/dist/utils/manifest-prune.js +4 -4
- package/dist/utils/manifest-prune.js.map +1 -1
- package/dist/utils/mirror-check.d.ts +3 -1
- package/dist/utils/mirror-check.d.ts.map +1 -1
- package/dist/utils/mirror-check.js +22 -11
- package/dist/utils/mirror-check.js.map +1 -1
- package/dist/utils/project-capabilities.js +5 -5
- package/dist/utils/project-capabilities.js.map +1 -1
- package/dist/utils/retrieval-agent-instructions.js +1 -1
- package/dist/utils/retrieval-agent-instructions.js.map +1 -1
- package/dist/utils/retrieval-execution-telemetry.js +1 -1
- package/dist/utils/retrieval-execution-telemetry.js.map +1 -1
- package/dist/utils/template-fetcher.js +1 -1
- package/dist/utils/template-fetcher.js.map +1 -1
- package/dist/utils/template-hash.d.ts +2 -2
- package/dist/utils/template-hash.d.ts.map +1 -1
- package/dist/utils/template-hash.js +12 -10
- package/dist/utils/template-hash.js.map +1 -1
- package/dist/utils/workflow-dir.d.ts +13 -0
- package/dist/utils/workflow-dir.d.ts.map +1 -0
- package/dist/utils/workflow-dir.js +35 -0
- package/dist/utils/workflow-dir.js.map +1 -0
- package/dist/utils/workflow-ownership.d.ts +36 -0
- package/dist/utils/workflow-ownership.d.ts.map +1 -0
- package/dist/utils/workflow-ownership.js +137 -0
- package/dist/utils/workflow-ownership.js.map +1 -0
- package/dist/utils/workflow-resolver.d.ts +1 -1
- package/dist/utils/workflow-resolver.js +1 -1
- package/package.json +2 -2
|
@@ -16,7 +16,7 @@ Use the same patterns as telemetry:
|
|
|
16
16
|
python -c "from common.retrieval_tool_classification import classify_tool_calls; print(classify_tool_calls(['Grep','codebase_search'], platform='cursor'))"
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
(Run from `.
|
|
19
|
+
(Run from `.cstl/scripts` with `PYTHONPATH` set to that directory.)
|
|
20
20
|
|
|
21
21
|
On **cursor**, `semantic_executed` = `platform_semantic_executed`. Track `fast_context_count` and `cursor_fast_context_misuse` separately.
|
|
22
22
|
|
|
@@ -98,14 +98,14 @@ When research is purely **codebase exploration** (no external web search, no fil
|
|
|
98
98
|
|
|
99
99
|
**What it is:** A reversible patch to Cursor++ `extension.js` resolver `WPeLc8` that maps `subagentType` → BYOK catalog **slug** (`model-xxxxx`), evaluated **before** the inherit-parent branch. Verified 2026-06-18 (Cursor++ v0.0.11).
|
|
100
100
|
|
|
101
|
-
**Trellis ships (every `cstl init` / `cstl update`, strategy C):** `.
|
|
101
|
+
**Trellis ships (every `cstl init` / `cstl update`, strategy C):** `.cstl/local/cursor2plus/` — `patch_wpelc8.py`, `README.md`, `config.local.json.example`. Native Cursor API users can ignore this directory.
|
|
102
102
|
|
|
103
103
|
**Operator workflow (Cursor++ BYOK only):**
|
|
104
104
|
|
|
105
105
|
1. Fill **`~/.ccursor/trellis-task-models.json`** (user-wide) with `subagent_type` → slug from **`~/.ccursor/providers.json`** `id` fields.
|
|
106
|
-
2. Optionally override per repo: **`.
|
|
106
|
+
2. Optionally override per repo: **`.cstl/local/subagent-models.json`** (project wins on same key).
|
|
107
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 `.
|
|
108
|
+
4. From `.cstl/local/cursor2plus/`: `python patch_wpelc8.py --print-map` → `python patch_wpelc8.py` → **Developer: Reload Window**.
|
|
109
109
|
5. **Verify:** `taskToolCall dispatching` → `resolvedModelId` matches slug.
|
|
110
110
|
|
|
111
111
|
**Revert:** `python patch_wpelc8.py --revert`; Reload Window. Re-run patch after Cursor / Cursor++ upgrades.
|
|
@@ -117,7 +117,7 @@ When research is purely **codebase exploration** (no external web search, no fil
|
|
|
117
117
|
For rare per-dispatch models on the Task channel without changing global slots:
|
|
118
118
|
|
|
119
119
|
1. Add `.cursor/agents/cstl-worker-<id>.md` (role prompt only; no committed `model:`).
|
|
120
|
-
2. Add `"cstl-worker-<id>": "model-xxxxx"` to **project** `.
|
|
120
|
+
2. Add `"cstl-worker-<id>": "model-xxxxx"` to **project** `.cstl/local/subagent-models.json`.
|
|
121
121
|
3. Re-run `patch_wpelc8.py`; dispatch `Task(subagent_type=cstl-worker-<id>)`.
|
|
122
122
|
4. Remove agent file and JSON key when done.
|
|
123
123
|
|
|
@@ -128,7 +128,7 @@ Parent/Child **default** does not use 2.6 — it uses `cstl-implement` from the
|
|
|
128
128
|
When a custom Task subagent (`cstl-research`, `cstl-implement`, `cstl-check`) needs a **different model** than the parent under BYOK **and Method 2.5 is not available**:
|
|
129
129
|
|
|
130
130
|
1. **Main session prepares the dispatch prompt** — full text with:
|
|
131
|
-
- First line: Selected task: <path> (e.g. .
|
|
131
|
+
- First line: Selected task: <path> (e.g. .cstl/tasks/06-17-my-task)
|
|
132
132
|
- Task context from inject-subagent-context.py content (PRD, design, implement docs)
|
|
133
133
|
- Agent role instructions (from the corresponding .cursor/agents/cstl-<role>.md)
|
|
134
134
|
- Specific work assignment
|
|
@@ -217,14 +217,14 @@ Operational contract between the Trellis task ladder and Cursor++ BYOK.
|
|
|
217
217
|
| Layer | Picks model for… | Mechanism |
|
|
218
218
|
| ----- | ---------------- | --------- |
|
|
219
219
|
| **You (operator)** | Main orchestration chat | Cursor model picker (parent BYOK route) |
|
|
220
|
-
| **You (operator)** | `cstl-research` / `cstl-implement` / `cstl-check` (+ optional built-in Task types) | **Method 2.5 / 2.6** JSON maps + `.
|
|
220
|
+
| **You (operator)** | `cstl-research` / `cstl-implement` / `cstl-check` (+ optional built-in Task types) | **Method 2.5 / 2.6** JSON maps + `.cstl/local/cursor2plus/patch_wpelc8.py` — **not** repo agent files |
|
|
221
221
|
| **You (operator)** | `explore` | Cursor++ panel |
|
|
222
222
|
| **Main Agent session** | When to spawn which agent | `workflow.md`, skills, scene matrix |
|
|
223
223
|
| **Hooks** | Never | `inject-subagent-context.py` — task context only |
|
|
224
224
|
|
|
225
225
|
### Normal Full / Lite task flow
|
|
226
226
|
|
|
227
|
-
1. **Select task** — `task.py select`; dispatch prompts include `Selected task: .
|
|
227
|
+
1. **Select task** — `task.py select`; dispatch prompts include `Selected task: .cstl/tasks/<id>` when hooks need it.
|
|
228
228
|
2. **Main session model** — your choice for planning and orchestration.
|
|
229
229
|
3. **Research** — Task `subagent_type=cstl-research` → mapped research slug (Method 2.5).
|
|
230
230
|
4. **Implement** — after `start-execution --approved`, Task `cstl-implement` → mapped implement slug.
|
|
@@ -252,7 +252,7 @@ No model field in dispatch prompt under Method 2.5. Task `model: fast` does **no
|
|
|
252
252
|
|
|
253
253
|
1. Resolve slugs in `~/.ccursor/providers.json` (or path in `config.local.json`).
|
|
254
254
|
2. Edit user and/or project JSON maps; include `generalPurpose`, `shell`, `best-of-n-runner` if you use those Task types.
|
|
255
|
-
3. Run `patch_wpelc8.py` from `.
|
|
255
|
+
3. Run `patch_wpelc8.py` from `.cstl/local/cursor2plus/` → Reload Window.
|
|
256
256
|
4. Re-apply after Cursor / Cursor++ upgrades.
|
|
257
257
|
|
|
258
258
|
### What stays in the Trellis repo
|
|
@@ -317,7 +317,7 @@ trellis_task_subagents:
|
|
|
317
317
|
If a dispatched subagent cannot answer from `prd.md` / jsonl (empty or generic replies):
|
|
318
318
|
|
|
319
319
|
1. Confirm the main session used **CLI Layer 2** before `Task(...)` (workflow Phase 2.1 / 2.2).
|
|
320
|
-
2. **Manual fallback (Method 3):** run `python ./.
|
|
320
|
+
2. **Manual fallback (Method 3):** run `python ./.cstl/scripts/task.py generate-dispatch-prompt <task-dir> <role> [--scope "..."]`, paste stdout into `Task(subagent_type=..., prompt=...)`.
|
|
321
321
|
3. Hook-only injection is best-effort on Cursor; do not treat `preToolUse` as the sole source.
|
|
322
322
|
|
|
323
323
|
This command is **Agent-facing** — not listed in user README or slash command surface.
|
|
@@ -385,9 +385,9 @@ For multi-package workspaces, list all install commands needed after a fresh che
|
|
|
385
385
|
## References
|
|
386
386
|
|
|
387
387
|
- `.cursor/agents/cstl-research.md`, `cstl-implement.md`, `cstl-check.md`
|
|
388
|
-
- `.cursor/agents/.
|
|
388
|
+
- `.cursor/agents/.cstl-model-overlay.local.md` — optional overlay audit stub (native API)
|
|
389
389
|
- Reference `patch_wpelc8.py` in task `06-18-byok-manual-dispatch-automation/research/` — copy locally; not a runtime git dependency
|
|
390
|
-
- `.
|
|
390
|
+
- `.cstl/workflow.md` — Task Ladder + Parent orchestration
|
|
391
391
|
- [Cursor Subagents](https://cursor.com/docs/subagents) — `model: inherit | <id>`
|
|
392
392
|
- [Cursor Multitask changelog](https://cursor.com/changelog/04-24-26) — `/multitask`, Worktrees, Multi-root Workspaces
|
|
393
393
|
- `.cursor/worktrees.json` — Cursor native worktree setup configuration
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Durable Learning Decision Guide
|
|
2
2
|
|
|
3
|
-
> **Purpose**: Decide whether a completed task should update `.
|
|
3
|
+
> **Purpose**: Decide whether a completed task should update `.cstl/spec/` or can archive with an explicit **no durable learning** line.
|
|
4
4
|
|
|
5
|
-
This guide is a **thinking checklist**. It does not replace code-spec files under `.
|
|
5
|
+
This guide is a **thinking checklist**. It does not replace code-spec files under `.cstl/spec/<layer>/`.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -13,9 +13,9 @@ Pick **one** grep-friendly line before `archive --check`:
|
|
|
13
13
|
| Outcome | Example line in `verify.md` |
|
|
14
14
|
| --- | --- |
|
|
15
15
|
| No reusable insight | `Durable learning decision: no durable learning` (or any line containing `no durable learning`) |
|
|
16
|
-
| Spec was updated | `Spec update evidence: .
|
|
17
|
-
| Insight already documented | `Learning artifact: .
|
|
18
|
-
| Retrospective captured | `Learning artifact: .
|
|
16
|
+
| Spec was updated | `Spec update evidence: .cstl/spec/Trellis/framework/index.md` |
|
|
17
|
+
| Insight already documented | `Learning artifact: .cstl/tasks/<task>/handoff.md` |
|
|
18
|
+
| Retrospective captured | `Learning artifact: .cstl/workspace/...` or `retrospective.md: <path>` |
|
|
19
19
|
|
|
20
20
|
Optional planning note (not sufficient alone): `Spec update needed: <reason>` — still record **spec update evidence** after `/cstl:update-spec`.
|
|
21
21
|
|
|
@@ -47,13 +47,13 @@ Optional planning note (not sufficient alone): `Spec update needed: <reason>`
|
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
49
|
# Draft missing archive sections (append-only)
|
|
50
|
-
python ./.
|
|
50
|
+
python ./.cstl/scripts/task.py prepare-archive-evidence .cstl/tasks/<task>
|
|
51
51
|
|
|
52
52
|
# Print spec-capture checklist (stdout only; does not edit specs)
|
|
53
|
-
python ./.
|
|
53
|
+
python ./.cstl/scripts/task.py prepare-learning-scaffold .cstl/tasks/<task> --trigger "parent review changes"
|
|
54
54
|
|
|
55
55
|
# Parent review surfaces missing child learning lines
|
|
56
|
-
python ./.
|
|
56
|
+
python ./.cstl/scripts/task.py review-child <parent> <child> --check
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
---
|
|
@@ -16,8 +16,8 @@ Non-git repo roots do **not** force `inline` for code Full tasks; they only affe
|
|
|
16
16
|
## Suggest (planning)
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
python3 ./.
|
|
20
|
-
python3 ./.
|
|
19
|
+
python3 ./.cstl/scripts/task.py suggest-execution-strategy <task-dir>
|
|
20
|
+
python3 ./.cstl/scripts/task.py suggest-execution-strategy <task-dir> --json
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Run during brainstorm / before finalizing the YAML block in `implement.md`. Reconcile suggestion with product intent; the contract in `implement.md` is authoritative after approval.
|
|
@@ -32,7 +32,7 @@ Run during brainstorm / before finalizing the YAML block in `implement.md`. Reco
|
|
|
32
32
|
| Parent / has children | `inline` | `main-worktree` |
|
|
33
33
|
| Child (`task.json` parent set) | `child-task` | `git-worktree` when git package root resolves; else `main-worktree` + WARN |
|
|
34
34
|
|
|
35
|
-
`touches_code` is deterministic: code `optional_capabilities`, `package`/`scope` path segments (`src`, `packages`, `scripts`, …), or Full with `design.md` and non-doc-only capabilities. Rules live in `.
|
|
35
|
+
`touches_code` is deterministic: code `optional_capabilities`, `package`/`scope` path segments (`src`, `packages`, `scripts`, …), or Full with `design.md` and non-doc-only capabilities. Rules live in `.cstl/config/execution-strategy-rules.json`.
|
|
36
36
|
|
|
37
37
|
## Drift warning (preflight)
|
|
38
38
|
|
|
@@ -46,13 +46,13 @@ When `projectFileCount > 2000`, the router promotes structural (codegraph) route
|
|
|
46
46
|
## Commands
|
|
47
47
|
|
|
48
48
|
```powershell
|
|
49
|
-
python ./.
|
|
50
|
-
python ./.
|
|
51
|
-
python ./.
|
|
52
|
-
python ./.
|
|
53
|
-
python ./.
|
|
54
|
-
python ./.
|
|
55
|
-
python ./.
|
|
49
|
+
python ./.cstl/scripts/search_artifacts.py --query "<topic>" --json
|
|
50
|
+
python ./.cstl/scripts/search_memory.py --query "<topic>" --json
|
|
51
|
+
python ./.cstl/scripts/run_smart_search.py "<question>" --intent deep-research --json
|
|
52
|
+
python ./.cstl/scripts/route_codebase_retrieval.py "<question>" --json
|
|
53
|
+
python ./.cstl/scripts/route_codebase_retrieval.py "<question>" --instructions
|
|
54
|
+
python ./.cstl/scripts/get_context.py --mode retrieval-pack --json --input evidence.json
|
|
55
|
+
python ./.cstl/scripts/codegraph_session_smoke.py --json
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
## Codegraph session readiness (eval / dogfood)
|
|
@@ -60,7 +60,7 @@ python ./.trellis/scripts/codegraph_session_smoke.py --json
|
|
|
60
60
|
Before a **cold benchmark** or structural-heavy run:
|
|
61
61
|
|
|
62
62
|
1. **MCP**: In Cursor project MCP settings, enable the **codegraph** server for the workspace (or eval checkout).
|
|
63
|
-
2. **Index on disk**: Run `python ./.
|
|
63
|
+
2. **Index on disk**: Run `python ./.cstl/scripts/codegraph_session_smoke.py` (exit 0 = at least one `.codegraph/` under workspace root or a top-level subproject). Use `--root <eval-checkout>` when the agent root is not the harness.
|
|
64
64
|
3. **Live MCP smoke** (manual): one `codegraph_search` with a known symbol in that repo; stale-index banner → re-read affected files.
|
|
65
65
|
|
|
66
66
|
Paste into the **run report header** (markdown):
|
|
@@ -76,7 +76,7 @@ Paste into the **run report header** (markdown):
|
|
|
76
76
|
|
|
77
77
|
When `smart-search doctor` is not ok or `run_smart_search.py` status is `not_configured` / `failed` (including **search timeout**), use **Cursor WebSearch/WebFetch**, then persist to `{TASK}/research/` with `source: cursor-web-fallback` in frontmatter. See `smart-search-cli` skill §4b.
|
|
78
78
|
|
|
79
|
-
**CLI discovery (Cursor):** `TRELLIS_SMART_SEARCH_COMMAND` / `smart_search.command` → PATH `smart-search` → project `node_modules/.bin/smart-search` (when installed as a dependency). Agent entrypoint is always `./.
|
|
79
|
+
**CLI discovery (Cursor):** `TRELLIS_SMART_SEARCH_COMMAND` / `smart_search.command` → PATH `smart-search` → project `node_modules/.bin/smart-search` (when installed as a dependency). Agent entrypoint is always `./.cstl/scripts/run_smart_search.py`.
|
|
80
80
|
|
|
81
81
|
**Research flags (smart-search ≥ 0.1.15):** pass through `run_smart_search.py` for `--intent deep-research`:
|
|
82
82
|
|
|
@@ -107,7 +107,7 @@ After Grep/codegraph/semantic produce **path candidates**, reorder before choosi
|
|
|
107
107
|
| `env-config-literal` | Prefer `scripts/`, `e2e/`, `bench/`, `test/` over generic `src/auth` / `src/paths`. |
|
|
108
108
|
|
|
109
109
|
- **Agent plans**: `render_agent_instructions` / `inject-retrieval-plan.py` append a **结果层排序** block when these intents appear.
|
|
110
|
-
- **Offline reorder**: `python ./.
|
|
110
|
+
- **Offline reorder**: `python ./.cstl/scripts/rank_retrieval_candidates.py --candidates fixtures.json --intents caller-chain --top-k 5 --pretty`
|
|
111
111
|
- **Library**: `common/retrieval_result_ranking.py` (Python mirror used by router and rank script).
|
|
112
112
|
|
|
113
113
|
Do **not** claim aggregate openclaw score gains from ranking alone without fresh telemetry (`candidate_pool_recall` vs final Top-K).
|
|
@@ -38,7 +38,7 @@ workspace/
|
|
|
38
38
|
Run the initialization script:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
python3 ./.
|
|
41
|
+
python3 ./.cstl/scripts/init_developer.py <your-name>
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
This will:
|
|
@@ -51,12 +51,12 @@ This will:
|
|
|
51
51
|
|
|
52
52
|
1. Get your developer name:
|
|
53
53
|
```bash
|
|
54
|
-
python3 ./.
|
|
54
|
+
python3 ./.cstl/scripts/get_developer.py
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
2. Read your personal index:
|
|
58
58
|
```bash
|
|
59
|
-
cat .
|
|
59
|
+
cat .cstl/workspace/$(python3 ./.cstl/scripts/get_developer.py)/index.md
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
---
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared hook templates — platform-independent Python hook scripts.
|
|
3
3
|
*
|
|
4
|
-
* These scripts read only from .
|
|
4
|
+
* These scripts read only from .cstl/ paths (JSONL, prd.md, spec/) and
|
|
5
5
|
* have no platform-specific placeholders. They can be written as-is to any
|
|
6
6
|
* platform's hooks directory.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared hook templates — platform-independent Python hook scripts.
|
|
3
3
|
*
|
|
4
|
-
* These scripts read only from .
|
|
4
|
+
* These scripts read only from .cstl/ paths (JSONL, prd.md, spec/) and
|
|
5
5
|
* have no platform-specific placeholders. They can be written as-is to any
|
|
6
6
|
* platform's hooks directory.
|
|
7
7
|
*/
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
DEGRADED MODE (2026-06-24): beforeSubmitPrompt hook's additional_context does
|
|
5
5
|
not reach the model in current Cursor versions (L1: event often not fired;
|
|
6
6
|
L2: additional_context not delivered). This hook now runs in telemetry-only
|
|
7
|
-
mode: logs routing decisions to .
|
|
7
|
+
mode: logs routing decisions to .cstl/.runtime/retrieval-plan-events.log
|
|
8
8
|
for post-session analysis but does NOT inject plan blocks.
|
|
9
9
|
|
|
10
|
-
See .
|
|
10
|
+
See .cstl/tasks/06-24-handle-beforesubmitprompt-unreliability/prd.md for
|
|
11
11
|
probe results and mitigation strategy.
|
|
12
12
|
|
|
13
13
|
Silent exit 0 (no stdout) when:
|
|
@@ -48,7 +48,7 @@ if sys.platform.startswith("win"):
|
|
|
48
48
|
except Exception:
|
|
49
49
|
pass
|
|
50
50
|
|
|
51
|
-
DIR_WORKFLOW = ".
|
|
51
|
+
DIR_WORKFLOW = ".cstl"
|
|
52
52
|
PLAN_MARKER_ZH = "## 代码库检索计划"
|
|
53
53
|
PLAN_MARKER_EN = "## Codebase retrieval plan"
|
|
54
54
|
TELEMETRY_LOG = ".runtime/retrieval-plan-events.log"
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"""Cursor beforeShellExecution hook: bridge conversation identity to task.py.
|
|
3
3
|
|
|
4
4
|
Cursor's shell command environment does not inherit SessionStart data. This
|
|
5
|
-
hook writes a short-lived runtime ticket before Cursor runs a shell command
|
|
6
|
-
that calls `task.py select/selected/exit`. The task script then consumes the
|
|
7
|
-
ticket only when it has no native session environment.
|
|
5
|
+
hook writes a short-lived runtime ticket before Cursor runs a shell command
|
|
6
|
+
that calls `task.py select/selected/exit`. The task script then consumes the
|
|
7
|
+
ticket only when it has no native session environment.
|
|
8
8
|
"""
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
@@ -18,10 +18,10 @@ from pathlib import Path
|
|
|
18
18
|
from typing import Any
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
DIR_WORKFLOW = ".
|
|
21
|
+
DIR_WORKFLOW = ".cstl"
|
|
22
22
|
DIR_RUNTIME = ".runtime"
|
|
23
23
|
DIR_CURSOR_SHELL = "cursor-shell"
|
|
24
|
-
SESSION_SUBCOMMANDS = {"select", "selected", "exit"}
|
|
24
|
+
SESSION_SUBCOMMANDS = {"select", "selected", "exit"}
|
|
25
25
|
TICKET_TTL_SECONDS = 30
|
|
26
26
|
CONTEXT_IDENTITY_KEYS = (
|
|
27
27
|
"session_id",
|
|
@@ -80,8 +80,8 @@ def _extract_task_subcommands(command: str) -> list[dict[str, str]]:
|
|
|
80
80
|
if name not in SESSION_SUBCOMMANDS:
|
|
81
81
|
continue
|
|
82
82
|
item = {"name": name}
|
|
83
|
-
if name == "select" and index + 2 < len(tokens):
|
|
84
|
-
item["task_ref"] = tokens[index + 2]
|
|
83
|
+
if name == "select" and index + 2 < len(tokens):
|
|
84
|
+
item["task_ref"] = tokens[index + 2]
|
|
85
85
|
subcommands.append(item)
|
|
86
86
|
return subcommands
|
|
87
87
|
|
|
@@ -26,7 +26,7 @@ if sys.platform.startswith("win"):
|
|
|
26
26
|
elif hasattr(sys.stdout, "detach"):
|
|
27
27
|
sys.stdout = _io.TextIOWrapper(sys.stdout.detach(), encoding="utf-8", errors="replace") # type: ignore[union-attr]
|
|
28
28
|
|
|
29
|
-
DIR_WORKFLOW = ".
|
|
29
|
+
DIR_WORKFLOW = ".cstl"
|
|
30
30
|
|
|
31
31
|
AGENT_IMPLEMENT = "cstl-implement"
|
|
32
32
|
AGENT_CHECK = "cstl-check"
|
|
@@ -23,7 +23,7 @@ hook entry point). Written to each platform's hooks directory via
|
|
|
23
23
|
writeSharedHooks() at init time.
|
|
24
24
|
|
|
25
25
|
Silent exit 0 cases (no output):
|
|
26
|
-
- No .
|
|
26
|
+
- No .cstl/ directory found (not a Trellis project)
|
|
27
27
|
- task.json malformed or missing status
|
|
28
28
|
"""
|
|
29
29
|
from __future__ import annotations
|
|
@@ -71,14 +71,14 @@ If you have not already loaded Trellis context this session, read the `cstl-star
|
|
|
71
71
|
# ---------------------------------------------------------------------------
|
|
72
72
|
|
|
73
73
|
def find_trellis_root(start: Path) -> Optional[Path]:
|
|
74
|
-
"""Walk up from start to find directory containing .
|
|
74
|
+
"""Walk up from start to find directory containing .cstl/.
|
|
75
75
|
|
|
76
76
|
Handles CWD drift: subdirectory launches, monorepo packages, etc.
|
|
77
|
-
Returns None if no .
|
|
77
|
+
Returns None if no .cstl/ found (silent no-op).
|
|
78
78
|
"""
|
|
79
79
|
cur = start.resolve()
|
|
80
80
|
while cur != cur.parent:
|
|
81
|
-
if (cur / ".
|
|
81
|
+
if (cur / ".cstl").is_dir():
|
|
82
82
|
return cur
|
|
83
83
|
cur = cur.parent
|
|
84
84
|
return None
|
|
@@ -125,7 +125,7 @@ def _detect_platform(input_data: dict) -> str | None:
|
|
|
125
125
|
|
|
126
126
|
|
|
127
127
|
def _resolve_selected_task(root: Path, input_data: dict):
|
|
128
|
-
scripts_dir = root / ".
|
|
128
|
+
scripts_dir = root / ".cstl" / "scripts"
|
|
129
129
|
if str(scripts_dir) not in sys.path:
|
|
130
130
|
sys.path.insert(0, str(scripts_dir))
|
|
131
131
|
from common.active_task import resolve_selected_task # type: ignore[import-not-found]
|
|
@@ -180,7 +180,7 @@ def load_breadcrumbs(root: Path) -> dict[str, str]:
|
|
|
180
180
|
in build_breadcrumb so users see the broken state and fix
|
|
181
181
|
workflow.md, rather than the hook silently masking the issue.
|
|
182
182
|
"""
|
|
183
|
-
workflow = root / ".
|
|
183
|
+
workflow = root / ".cstl" / "workflow.md"
|
|
184
184
|
if not workflow.is_file():
|
|
185
185
|
return {}
|
|
186
186
|
try:
|
|
@@ -198,12 +198,12 @@ def load_breadcrumbs(root: Path) -> dict[str, str]:
|
|
|
198
198
|
|
|
199
199
|
|
|
200
200
|
def _read_trellis_config(root: Path) -> dict:
|
|
201
|
-
"""Load .
|
|
201
|
+
"""Load .cstl/config.yaml via the bundled trellis_config helper.
|
|
202
202
|
|
|
203
|
-
The helper lives in .
|
|
203
|
+
The helper lives in .cstl/scripts/common; the hook lives outside the
|
|
204
204
|
scripts tree, so we extend sys.path before importing.
|
|
205
205
|
"""
|
|
206
|
-
scripts_dir = root / ".
|
|
206
|
+
scripts_dir = root / ".cstl" / "scripts"
|
|
207
207
|
if str(scripts_dir) not in sys.path:
|
|
208
208
|
sys.path.insert(0, str(scripts_dir))
|
|
209
209
|
try:
|
|
@@ -219,7 +219,7 @@ def _read_trellis_config(root: Path) -> dict:
|
|
|
219
219
|
def _codex_mode_banner(config: dict) -> str:
|
|
220
220
|
"""Emit a `<codex-mode>` banner for the additionalContext payload.
|
|
221
221
|
|
|
222
|
-
Reads `codex.dispatch_mode` from .
|
|
222
|
+
Reads `codex.dispatch_mode` from .cstl/config.yaml; defaults to
|
|
223
223
|
`inline` when missing or invalid because Codex sub-agents run with
|
|
224
224
|
`fork_turns="none"` isolation and can't inherit the parent session's
|
|
225
225
|
task context. The banner makes the active mode explicit to Codex AI
|
|
@@ -254,7 +254,7 @@ def resolve_breadcrumb_key(
|
|
|
254
254
|
|
|
255
255
|
Codex defaults to ``inline`` because sub-agents run with ``fork_turns="none"``
|
|
256
256
|
isolation and can't inherit the parent session's task context. Users can
|
|
257
|
-
opt into ``codex.dispatch_mode: sub-agent`` in ``.
|
|
257
|
+
opt into ``codex.dispatch_mode: sub-agent`` in ``.cstl/config.yaml``
|
|
258
258
|
to use the parallel ``<status>-inline`` tag → ``<status>`` flip. Invalid
|
|
259
259
|
or missing values fall back to inline.
|
|
260
260
|
|
|
@@ -308,7 +308,7 @@ def _normalize_task_ref(task_ref: str) -> str:
|
|
|
308
308
|
normalized = normalized[2:]
|
|
309
309
|
|
|
310
310
|
if normalized.startswith("tasks/"):
|
|
311
|
-
return f".
|
|
311
|
+
return f".cstl/{normalized}"
|
|
312
312
|
|
|
313
313
|
return normalized
|
|
314
314
|
|
|
@@ -318,7 +318,7 @@ def _resolve_task_dir(trellis_dir: Path, task_ref: str) -> Path:
|
|
|
318
318
|
path_obj = Path(normalized)
|
|
319
319
|
if path_obj.is_absolute():
|
|
320
320
|
return path_obj
|
|
321
|
-
if normalized.startswith(".
|
|
321
|
+
if normalized.startswith(".cstl/"):
|
|
322
322
|
return trellis_dir.parent / path_obj
|
|
323
323
|
return trellis_dir / "tasks" / path_obj
|
|
324
324
|
|
|
@@ -341,7 +341,7 @@ def _get_task_status(trellis_dir: Path, input_data: dict) -> str:
|
|
|
341
341
|
return (
|
|
342
342
|
f"Trellis framework: active\nSelected task: {task_ref}\n"
|
|
343
343
|
"Status: STALE SELECTION\n"
|
|
344
|
-
f"Next-Action: Run `{_PYTHON_CMD} ./.
|
|
344
|
+
f"Next-Action: Run `{_PYTHON_CMD} ./.cstl/scripts/task.py exit` to clear the stale selection, "
|
|
345
345
|
"then ask the user what to work on next."
|
|
346
346
|
)
|
|
347
347
|
|
|
@@ -570,7 +570,7 @@ def _collect_spec_index_paths(trellis_dir: Path, allowed_pkgs: set | None) -> li
|
|
|
570
570
|
paths: list[str] = []
|
|
571
571
|
guides_index = trellis_dir / "spec" / "guides" / "index.md"
|
|
572
572
|
if guides_index.is_file():
|
|
573
|
-
paths.append(".
|
|
573
|
+
paths.append(".cstl/spec/guides/index.md")
|
|
574
574
|
|
|
575
575
|
spec_dir = trellis_dir / "spec"
|
|
576
576
|
if not spec_dir.is_dir():
|
|
@@ -582,7 +582,7 @@ def _collect_spec_index_paths(trellis_dir: Path, allowed_pkgs: set | None) -> li
|
|
|
582
582
|
|
|
583
583
|
index_file = sub / "index.md"
|
|
584
584
|
if index_file.is_file():
|
|
585
|
-
paths.append(f".
|
|
585
|
+
paths.append(f".cstl/spec/{sub.name}/index.md")
|
|
586
586
|
continue
|
|
587
587
|
|
|
588
588
|
if allowed_pkgs is not None and sub.name not in allowed_pkgs:
|
|
@@ -592,7 +592,7 @@ def _collect_spec_index_paths(trellis_dir: Path, allowed_pkgs: set | None) -> li
|
|
|
592
592
|
continue
|
|
593
593
|
nested_index = nested / "index.md"
|
|
594
594
|
if nested_index.is_file():
|
|
595
|
-
paths.append(f".
|
|
595
|
+
paths.append(f".cstl/spec/{sub.name}/{nested.name}/index.md")
|
|
596
596
|
|
|
597
597
|
return paths
|
|
598
598
|
|
|
@@ -641,7 +641,7 @@ def _build_compact_current_state(
|
|
|
641
641
|
try:
|
|
642
642
|
task_count = sum(1 for _ in iter_active_tasks(get_tasks_dir(repo_root)))
|
|
643
643
|
lines.append(
|
|
644
|
-
f"Active tasks: {task_count} total. Use the Task Dashboard for routing; use `{_PYTHON_CMD} ./.
|
|
644
|
+
f"Active tasks: {task_count} total. Use the Task Dashboard for routing; use `{_PYTHON_CMD} ./.cstl/scripts/task.py list --mine` only for raw inspection."
|
|
645
645
|
)
|
|
646
646
|
except Exception:
|
|
647
647
|
pass
|
|
@@ -672,7 +672,7 @@ def _build_task_dashboard(trellis_dir: Path, input_data: dict) -> str:
|
|
|
672
672
|
_detect_platform(input_data),
|
|
673
673
|
)
|
|
674
674
|
except Exception:
|
|
675
|
-
return f"Task Dashboard unavailable. Run: {_PYTHON_CMD} ./.
|
|
675
|
+
return f"Task Dashboard unavailable. Run: {_PYTHON_CMD} ./.cstl/scripts/task.py dashboard"
|
|
676
676
|
|
|
677
677
|
|
|
678
678
|
def _extract_range(content: str, start_header: str, end_header: str) -> str:
|
|
@@ -739,7 +739,7 @@ def _build_workflow_overview(workflow_path: Path) -> str:
|
|
|
739
739
|
|
|
740
740
|
out_lines = [
|
|
741
741
|
"# Development Workflow - Session Summary",
|
|
742
|
-
f"Full guide: .
|
|
742
|
+
f"Full guide: .cstl/workflow.md. Step detail: `{_PYTHON_CMD} ./.cstl/scripts/get_context.py --mode phase --step <X.Y>`.",
|
|
743
743
|
"",
|
|
744
744
|
]
|
|
745
745
|
|
|
@@ -781,7 +781,7 @@ def main():
|
|
|
781
781
|
if project_dir is None:
|
|
782
782
|
project_dir = Path(_normalize_windows_shell_path(hook_input.get("cwd", "."))).resolve()
|
|
783
783
|
|
|
784
|
-
trellis_dir = project_dir / ".
|
|
784
|
+
trellis_dir = project_dir / ".cstl"
|
|
785
785
|
context_key = _resolve_context_key(trellis_dir, hook_input)
|
|
786
786
|
_persist_context_key_for_bash(context_key)
|
|
787
787
|
|
|
@@ -836,17 +836,17 @@ Trellis compact SessionStart context. Use it to orient the session; load details
|
|
|
836
836
|
|
|
837
837
|
output.write(
|
|
838
838
|
"Discover more via: "
|
|
839
|
-
f"`{_PYTHON_CMD} ./.
|
|
839
|
+
f"`{_PYTHON_CMD} ./.cstl/scripts/get_context.py --mode packages`\n"
|
|
840
840
|
)
|
|
841
841
|
if _detect_platform(hook_input) == "cursor":
|
|
842
842
|
output.write(
|
|
843
843
|
"\n**External web research (Cursor):** run "
|
|
844
|
-
f"`{_PYTHON_CMD} ./.
|
|
844
|
+
f"`{_PYTHON_CMD} ./.cstl/scripts/run_smart_search.py \"<question>\" "
|
|
845
845
|
"--intent deep-research --json` first (Trellis evidence wrapper → "
|
|
846
846
|
"`smart-search` CLI). CLI discovery: `TRELLIS_SMART_SEARCH_COMMAND` / "
|
|
847
847
|
"`smart_search.command`, then PATH `smart-search`, then project "
|
|
848
848
|
"`node_modules/.bin/smart-search`, then optional repo-local layouts "
|
|
849
|
-
"(see `.
|
|
849
|
+
"(see `.cstl/spec/guides/retrieval-daily-guide.md`). "
|
|
850
850
|
"`smart-search-cli` is an internal workflow skill name — not a file under `.cursor/skills/` on Cursor. "
|
|
851
851
|
"If `run_smart_search.py` status is `not_configured` or `failed` (incl. timeout), "
|
|
852
852
|
"use **WebSearch/WebFetch**, persist `{TASK}/research/*.md` with "
|
|
@@ -24,7 +24,7 @@ max_journal_lines: 2000
|
|
|
24
24
|
# - false: scripts do not touch git. Files (journal-*.md, task archive moves)
|
|
25
25
|
# are still written to disk; you decide whether to git add / commit.
|
|
26
26
|
#
|
|
27
|
-
# Use `false` if your project's .gitignore intentionally excludes `.
|
|
27
|
+
# Use `false` if your project's .gitignore intentionally excludes `.cstl/`
|
|
28
28
|
# and you want session data kept local-only, or if you prefer to review
|
|
29
29
|
# staged changes manually before each commit.
|
|
30
30
|
#
|
|
@@ -88,7 +88,7 @@ max_journal_lines: 2000
|
|
|
88
88
|
#-------------------------------------------------------------------------------
|
|
89
89
|
# Cursor subagent dispatch (documentation only — not Cursor product settings)
|
|
90
90
|
#-------------------------------------------------------------------------------
|
|
91
|
-
# See .
|
|
91
|
+
# See .cstl/spec/guides/cursor-subagent-policy.md
|
|
92
92
|
#
|
|
93
93
|
# cursor:
|
|
94
94
|
# subagent_dispatch:
|
|
@@ -98,26 +98,6 @@ max_journal_lines: 2000
|
|
|
98
98
|
# mode: separate_writable_agent_session
|
|
99
99
|
# reuse_policy: true
|
|
100
100
|
|
|
101
|
-
#-------------------------------------------------------------------------------
|
|
102
|
-
# Channel worker OOM guard
|
|
103
|
-
#-------------------------------------------------------------------------------
|
|
104
|
-
# Default safeguards for `cstl channel spawn` workers. The guard runs
|
|
105
|
-
# at spawn time (cleans expired idle workers, then enforces the live-worker
|
|
106
|
-
# budget) and inside each supervisor (self-terminates a worker that stays
|
|
107
|
-
# continuously idle past `idle_timeout`).
|
|
108
|
-
#
|
|
109
|
-
# Precedence: CLI flag > env var (TRELLIS_CHANNEL_WORKER_IDLE_TIMEOUT /
|
|
110
|
-
# TRELLIS_CHANNEL_MAX_LIVE_WORKERS) > this config > built-in default.
|
|
111
|
-
#
|
|
112
|
-
# `idle_timeout: 0` disables idle cleanup (workers can sit idle forever
|
|
113
|
-
# unless explicitly killed or given `--timeout`).
|
|
114
|
-
# `max_live_workers: 0` disables the spawn-time budget check.
|
|
115
|
-
#
|
|
116
|
-
channel:
|
|
117
|
-
worker_guard:
|
|
118
|
-
idle_timeout: 5m
|
|
119
|
-
max_live_workers: 6
|
|
120
|
-
|
|
121
101
|
#-------------------------------------------------------------------------------
|
|
122
102
|
# Codex (dispatch behavior)
|
|
123
103
|
#-------------------------------------------------------------------------------
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Trellis workflow templates
|
|
3
3
|
*
|
|
4
4
|
* These are GENERIC templates for user projects.
|
|
5
|
-
* Do NOT use Trellis project's own .
|
|
5
|
+
* Do NOT use Trellis project's own .cstl/ directory (which may be customized).
|
|
6
6
|
*
|
|
7
7
|
* Directory structure:
|
|
8
8
|
* trellis/
|
|
@@ -80,7 +80,7 @@ export declare const workflowMdTemplate: string;
|
|
|
80
80
|
export declare const configYamlTemplate: string;
|
|
81
81
|
export declare const gitignoreTemplate: string;
|
|
82
82
|
/**
|
|
83
|
-
* Optional task artifact templates (under `.
|
|
83
|
+
* Optional task artifact templates (under `.cstl/tasks/templates/`).
|
|
84
84
|
* Not applied by `task.py create`; copy into a new task directory when starting
|
|
85
85
|
* release-readiness or release-execution work.
|
|
86
86
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Trellis workflow templates
|
|
3
3
|
*
|
|
4
4
|
* These are GENERIC templates for user projects.
|
|
5
|
-
* Do NOT use Trellis project's own .
|
|
5
|
+
* Do NOT use Trellis project's own .cstl/ directory (which may be customized).
|
|
6
6
|
*
|
|
7
7
|
* Directory structure:
|
|
8
8
|
* trellis/
|
|
@@ -107,7 +107,7 @@ function readTaskTemplate(relativePath) {
|
|
|
107
107
|
return readTemplate(join("tasks", "templates", relativePath));
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
|
-
* Optional task artifact templates (under `.
|
|
110
|
+
* Optional task artifact templates (under `.cstl/tasks/templates/`).
|
|
111
111
|
* Not applied by `task.py create`; copy into a new task directory when starting
|
|
112
112
|
* release-readiness or release-execution work.
|
|
113
113
|
*/
|
|
@@ -20,7 +20,7 @@ User-wide model doc: `~/.ccursor/trellis-task-models.json5` (see `../trellis-tas
|
|
|
20
20
|
|
|
21
21
|
## Compatibility window
|
|
22
22
|
|
|
23
|
-
- **Verified:** Cursor **3.7.27** / Cursor++ **v0.0.11** (see `.
|
|
23
|
+
- **Verified:** Cursor **3.7.27** / Cursor++ **v0.0.11** (see `.cstl/spec/guides/cursor-subagent-policy.md`, 2026-06-18)
|
|
24
24
|
- **Re-verify** after any Cursor or Cursor++ upgrade: `python patch_wpelc8.py --check-compat`
|
|
25
25
|
- If `--check-compat` reports `fail` or `unknown`, treat the patch as stale until you re-apply or revert
|
|
26
26
|
|
|
@@ -38,7 +38,7 @@ Agent-led setup: run skill **`cstl-cursor2plus-setup`** in Cursor Agent (lists m
|
|
|
38
38
|
## Revert recipe
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
cd .
|
|
41
|
+
cd .cstl/local/cursor2plus
|
|
42
42
|
python patch_wpelc8.py --revert
|
|
43
43
|
```
|
|
44
44
|
|
|
@@ -82,4 +82,4 @@ python smoke.py # env + patch_status smoke
|
|
|
82
82
|
|
|
83
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
84
|
|
|
85
|
-
Policy: `.
|
|
85
|
+
Policy: `.cstl/spec/guides/cursor-subagent-policy.md` (Method 2.5 / 2.6).
|