@blxzer/cursor-trellis 0.3.0 → 0.3.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 +45 -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.d.ts.map +1 -1
- package/dist/commands/uninstall.js +69 -15
- 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/cursor-trellis-release-coexistence-guide.md.txt +166 -0
- 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/index.md.txt +1 -0
- 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 +47 -0
- package/dist/utils/agents-md.d.ts.map +1 -0
- package/dist/utils/agents-md.js +107 -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 +51 -18
- 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
|
@@ -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).
|
|
@@ -23,7 +23,7 @@ INJECT_NEEDLE = "});return!UbAQWn||"
|
|
|
23
23
|
def _repo_root(start: Path) -> Path:
|
|
24
24
|
cur = start.resolve()
|
|
25
25
|
for _ in range(12):
|
|
26
|
-
if (cur / ".
|
|
26
|
+
if (cur / ".cstl").is_dir():
|
|
27
27
|
return cur
|
|
28
28
|
if cur.parent == cur:
|
|
29
29
|
break
|
|
@@ -94,8 +94,8 @@ def resolve_project_models_path(bundle_dir: Path, config: dict) -> Path | None:
|
|
|
94
94
|
p = Path(config["projectModelsJson"].strip()).expanduser()
|
|
95
95
|
return p if p.is_file() else None
|
|
96
96
|
return _first_existing(
|
|
97
|
-
root / ".
|
|
98
|
-
root / ".
|
|
97
|
+
root / ".cstl" / "local" / "subagent-models.json5",
|
|
98
|
+
root / ".cstl" / "local" / "subagent-models.json",
|
|
99
99
|
)
|
|
100
100
|
|
|
101
101
|
|
|
@@ -167,7 +167,7 @@ def build_inject_block(model_map: dict[str, str]) -> str:
|
|
|
167
167
|
if not model_map:
|
|
168
168
|
raise SystemExit(
|
|
169
169
|
"model map empty — use skill cstl-cursor2plus-setup or write "
|
|
170
|
-
"~/.ccursor/trellis-task-models.json5 (see .
|
|
170
|
+
"~/.ccursor/trellis-task-models.json5 (see .cstl/local/trellis-task-models.json5.example)"
|
|
171
171
|
)
|
|
172
172
|
pairs = ",".join(f'"{k}":"{v}"' for k, v in sorted(model_map.items()))
|
|
173
173
|
return (
|
|
@@ -12,11 +12,11 @@ Usage:
|
|
|
12
12
|
<session content here>
|
|
13
13
|
EOF
|
|
14
14
|
|
|
15
|
-
Branch resolution order:
|
|
16
|
-
1. --branch CLI arg (explicit)
|
|
17
|
-
2. task.json branch field (from selected task)
|
|
18
|
-
3. git branch --show-current (auto-detect)
|
|
19
|
-
4. None (omitted gracefully)
|
|
15
|
+
Branch resolution order:
|
|
16
|
+
1. --branch CLI arg (explicit)
|
|
17
|
+
2. task.json branch field (from selected task)
|
|
18
|
+
3. git branch --show-current (auto-detect)
|
|
19
|
+
4. None (omitted gracefully)
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
22
|
from __future__ import annotations
|
|
@@ -28,12 +28,12 @@ from datetime import datetime
|
|
|
28
28
|
from pathlib import Path
|
|
29
29
|
|
|
30
30
|
from common.paths import (
|
|
31
|
-
FILE_JOURNAL_PREFIX,
|
|
32
|
-
get_repo_root,
|
|
33
|
-
get_selected_task,
|
|
34
|
-
get_developer,
|
|
35
|
-
get_workspace_dir,
|
|
36
|
-
)
|
|
31
|
+
FILE_JOURNAL_PREFIX,
|
|
32
|
+
get_repo_root,
|
|
33
|
+
get_selected_task,
|
|
34
|
+
get_developer,
|
|
35
|
+
get_workspace_dir,
|
|
36
|
+
)
|
|
37
37
|
from common.developer import ensure_developer
|
|
38
38
|
from common.git import run_git
|
|
39
39
|
from common.safe_commit import (
|
|
@@ -322,11 +322,11 @@ def _auto_commit_workspace(repo_root: Path) -> None:
|
|
|
322
322
|
"""Stage Trellis-owned workspace + task paths and commit.
|
|
323
323
|
|
|
324
324
|
Path scope is restricted to specific products (journal files, index.md,
|
|
325
|
-
selected task dirs, the archive subtree). We never `git add` the whole
|
|
326
|
-
`.
|
|
325
|
+
selected task dirs, the archive subtree). We never `git add` the whole
|
|
326
|
+
`.cstl/` tree, and if `.gitignore` blocks the specific paths we
|
|
327
327
|
warn + skip — never retry with ``-f``.
|
|
328
328
|
|
|
329
|
-
Honors ``session_auto_commit`` in ``.
|
|
329
|
+
Honors ``session_auto_commit`` in ``.cstl/config.yaml``: when set to
|
|
330
330
|
``false``, this function returns immediately without touching git
|
|
331
331
|
(journal/index files are still written to disk by the caller).
|
|
332
332
|
"""
|
|
@@ -502,10 +502,10 @@ def main() -> int:
|
|
|
502
502
|
elif args.stdin:
|
|
503
503
|
extra_content = sys.stdin.read()
|
|
504
504
|
|
|
505
|
-
# Load selected task once — shared by package and branch resolution
|
|
506
|
-
repo_root = get_repo_root()
|
|
507
|
-
selected = get_selected_task(repo_root)
|
|
508
|
-
task_data = load_task(repo_root / selected) if selected else None
|
|
505
|
+
# Load selected task once — shared by package and branch resolution
|
|
506
|
+
repo_root = get_repo_root()
|
|
507
|
+
selected = get_selected_task(repo_root)
|
|
508
|
+
task_data = load_task(repo_root / selected) if selected else None
|
|
509
509
|
|
|
510
510
|
package = args.package
|
|
511
511
|
if package:
|
|
@@ -519,8 +519,8 @@ def main() -> int:
|
|
|
519
519
|
print(f"Error: unknown package '{package}'. Available: {available}", file=sys.stderr)
|
|
520
520
|
return 1
|
|
521
521
|
else:
|
|
522
|
-
# Inferred: selected task's task.json.package → default_package → None
|
|
523
|
-
task_package = task_data.package if task_data else None
|
|
522
|
+
# Inferred: selected task's task.json.package → default_package → None
|
|
523
|
+
task_package = task_data.package if task_data else None
|
|
524
524
|
package = resolve_package(task_package, repo_root)
|
|
525
525
|
|
|
526
526
|
# Resolve branch: CLI → task.json → git auto-detect → None
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"""Session-scoped selected task resolution.
|
|
3
3
|
|
|
4
4
|
The user-facing concept is a live-session "selected task". Trellis stores that
|
|
5
|
-
pointer per AI session/window under `.
|
|
5
|
+
pointer per AI session/window under `.cstl/.runtime/sessions/`; without a
|
|
6
6
|
stable session key there is no selected task.
|
|
7
7
|
"""
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ from datetime import datetime, timezone
|
|
|
19
19
|
from pathlib import Path
|
|
20
20
|
from typing import Any
|
|
21
21
|
|
|
22
|
-
DIR_WORKFLOW = ".
|
|
22
|
+
DIR_WORKFLOW = ".cstl"
|
|
23
23
|
DIR_TASKS = "tasks"
|
|
24
24
|
DIR_RUNTIME = ".runtime"
|
|
25
25
|
DIR_SESSIONS = "sessions"
|