@blxzer/cursor-trellis 0.2.9 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +94 -0
- package/README.md +85 -19
- package/README.zh-CN.md +60 -21
- package/bin/smart-search.js +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +46 -18
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/capability-smoke.d.ts +24 -0
- package/dist/commands/capability-smoke.d.ts.map +1 -0
- package/dist/commands/capability-smoke.js +83 -0
- package/dist/commands/capability-smoke.js.map +1 -0
- package/dist/commands/channel/agent-loader.d.ts +1 -1
- package/dist/commands/channel/agent-loader.js +4 -4
- package/dist/commands/channel/agent-loader.js.map +1 -1
- package/dist/commands/channel/guard.d.ts +2 -2
- package/dist/commands/channel/guard.js +3 -3
- package/dist/commands/channel/guard.js.map +1 -1
- package/dist/commands/channel/index.js +3 -3
- package/dist/commands/channel/index.js.map +1 -1
- package/dist/commands/channel/list.d.ts +1 -1
- package/dist/commands/channel/list.js +1 -1
- package/dist/commands/channel/rm.d.ts +1 -1
- package/dist/commands/channel/rm.js +1 -1
- package/dist/commands/channel/store/lock.d.ts +1 -1
- package/dist/commands/channel/store/lock.js +1 -1
- package/dist/commands/channel/store/paths.js +1 -1
- package/dist/commands/channel/store/paths.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +197 -91
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/uninstall.d.ts +4 -4
- package/dist/commands/uninstall.js +12 -12
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.d.ts +7 -2
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +161 -61
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/upgrade.js +2 -2
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/commands/workflow.d.ts +4 -4
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +10 -9
- package/dist/commands/workflow.js.map +1 -1
- package/dist/configurators/cursor.d.ts +2 -2
- package/dist/configurators/cursor.js +4 -4
- package/dist/configurators/cursor.js.map +1 -1
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +4 -4
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/shared.d.ts +10 -10
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +32 -32
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts +6 -6
- package/dist/configurators/workflow.js +1 -1
- package/dist/constants/paths.d.ts +24 -24
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +16 -16
- package/dist/constants/paths.js.map +1 -1
- package/dist/migrations/manifests/0.2.10.json +374 -0
- package/dist/migrations/manifests/0.3.0.json +89 -0
- package/dist/migrations/manifests/0.3.1.json +32 -0
- package/dist/templates/common/bundled-skills/{trellis-cursor2plus-setup → cstl-cursor2plus-setup}/SKILL.md +15 -14
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/SKILL.md +75 -75
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/add-project-local-conventions.md +19 -19
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-agents.md +8 -8
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-context-loading.md +26 -26
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-hooks.md +9 -9
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-skills-or-commands.md +8 -8
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-spec-structure.md +17 -17
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-task-lifecycle.md +46 -46
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-workflow.md +18 -18
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/overview.md +55 -55
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/context-injection.md +20 -20
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/generated-files.md +83 -0
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/overview.md +15 -15
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/spec-system.md +12 -12
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/task-system.md +34 -34
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/workflow.md +8 -8
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/workspace-memory.md +19 -19
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/agents.md +12 -12
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/hooks-and-settings.md +7 -7
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/overview.md +9 -9
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/platform-map.md +7 -7
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/skills-and-commands.md +19 -19
- package/dist/templates/common/bundled-skills/{trellis-micro-grill → cstl-micro-grill}/SKILL.md +62 -47
- package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/SKILL.md +44 -44
- package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/references/authoring-rules.md +97 -97
- package/dist/templates/common/bundled-skills/{trellis-skill-creator/references/trellis-skill-locations.md → cstl-skill-creator/references/cstl-skill-locations.md} +52 -52
- package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/references/review-checklist.md +47 -47
- package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/SKILL.md +6 -6
- package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/repository-analysis.md +1 -1
- package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/spec-task-planning.md +3 -3
- package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/spec-writing.md +1 -1
- package/dist/templates/common/commands/continue.md +24 -24
- package/dist/templates/common/commands/finish-work.md +5 -5
- package/dist/templates/common/commands/start.md +20 -20
- package/dist/templates/common/index.d.ts +1 -1
- package/dist/templates/common/index.d.ts.map +1 -1
- package/dist/templates/common/skills/before-dev.md +4 -4
- package/dist/templates/common/skills/brainstorm.md +188 -164
- package/dist/templates/common/skills/break-loop.md +3 -3
- package/dist/templates/common/skills/check.md +5 -5
- package/dist/templates/common/skills/update-spec.md +4 -4
- package/dist/templates/cursor/agents/{trellis-check.md → cstl-check.md} +14 -14
- package/dist/templates/cursor/agents/{trellis-implement.md → cstl-implement.md} +14 -14
- package/dist/templates/cursor/agents/{trellis-research.md → cstl-research.md} +11 -11
- package/dist/templates/cursor/commands/cursor2plus-setup.md +15 -15
- package/dist/templates/cursor/fixtures/expected-rules.d.ts +1 -1
- package/dist/templates/cursor/fixtures/expected-rules.d.ts.map +1 -1
- package/dist/templates/cursor/fixtures/expected-rules.js +2 -2
- package/dist/templates/cursor/fixtures/expected-rules.js.map +1 -1
- package/dist/templates/cursor/rules/{trellis-subagent-dispatch.mdc → cstl-subagent-dispatch.mdc} +4 -4
- package/dist/templates/cursor/rules/{trellis-triage.mdc → cstl-triage.mdc} +3 -3
- package/dist/templates/cursor/rules/retrieval-routing.mdc +4 -4
- package/dist/templates/extract.d.ts +1 -1
- package/dist/templates/extract.js +1 -1
- package/dist/templates/markdown/agents.md +13 -13
- package/dist/templates/markdown/prompts/run-semantic-slice-12.md.txt +1 -1
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +634 -634
- package/dist/templates/markdown/spec/guides/cursor-context-injection-guide.md.txt +5 -5
- package/dist/templates/markdown/spec/guides/cursor-semantic-compliance.md.txt +7 -1
- package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +393 -391
- package/dist/templates/markdown/spec/guides/durable-learning-decision-guide.md.txt +14 -14
- package/dist/templates/markdown/spec/guides/execution-strategy.md.txt +5 -5
- package/dist/templates/markdown/spec/guides/index.md.txt +3 -2
- package/dist/templates/markdown/spec/guides/retrieval-daily-guide.md.txt +10 -10
- package/dist/templates/markdown/workspace-index.md +3 -3
- package/dist/templates/markdown/worktree.yaml.txt +1 -1
- package/dist/templates/shared-hooks/index.d.ts +2 -2
- package/dist/templates/shared-hooks/index.js +2 -2
- package/dist/templates/shared-hooks/inject-retrieval-plan.py +3 -3
- package/dist/templates/shared-hooks/inject-shell-session-context.py +7 -7
- package/dist/templates/shared-hooks/inject-subagent-context.py +4 -4
- package/dist/templates/shared-hooks/inject-workflow-state.py +37 -37
- package/dist/templates/shared-hooks/research-end-retrieval-pack.py +2 -2
- package/dist/templates/shared-hooks/session-start.py +16 -16
- package/dist/templates/trellis/config/execution-strategy-rules.json +1 -1
- package/dist/templates/trellis/config.yaml +5 -25
- package/dist/templates/trellis/index.d.ts +2 -2
- package/dist/templates/trellis/index.js +2 -2
- package/dist/templates/trellis/local/README.md +15 -13
- package/dist/templates/trellis/local/patch_wpelc8.py +7 -7
- package/dist/templates/trellis/local/subagent-models.json.example +1 -1
- package/dist/templates/trellis/local/trellis-task-models.json.example +3 -3
- package/dist/templates/trellis/local/trellis-task-models.json5.example +5 -5
- package/dist/templates/trellis/local/trellis_task_models_config.py +6 -6
- package/dist/templates/trellis/scripts/add_session.py +20 -20
- package/dist/templates/trellis/scripts/common/active_task.py +2 -2
- package/dist/templates/trellis/scripts/common/artifact_search.py +587 -587
- package/dist/templates/trellis/scripts/common/cli_adapter.py +3 -3
- package/dist/templates/trellis/scripts/common/codebase_retrieval_router.py +6 -6
- package/dist/templates/trellis/scripts/common/config.py +3 -3
- package/dist/templates/trellis/scripts/common/developer.py +2 -2
- package/dist/templates/trellis/scripts/common/execution_strategy.py +1 -1
- package/dist/templates/trellis/scripts/common/packages_context.py +23 -23
- package/dist/templates/trellis/scripts/common/parent_orchestration.py +702 -702
- package/dist/templates/trellis/scripts/common/paths.py +107 -107
- package/dist/templates/trellis/scripts/common/project_file_stats.py +1 -1
- package/dist/templates/trellis/scripts/common/retrieval_agent_instructions.py +1 -1
- package/dist/templates/trellis/scripts/common/safe_commit.py +31 -31
- package/dist/templates/trellis/scripts/common/session_context.py +1159 -1159
- package/dist/templates/trellis/scripts/common/session_memory.py +360 -360
- package/dist/templates/trellis/scripts/common/smart_search_evidence.py +514 -514
- package/dist/templates/trellis/scripts/common/smart_search_resolve.py +1 -1
- package/dist/templates/trellis/scripts/common/subagent_dispatch.py +7 -7
- package/dist/templates/trellis/scripts/common/task_context.py +1 -1
- package/dist/templates/trellis/scripts/common/task_dashboard.py +140 -140
- package/dist/templates/trellis/scripts/common/task_gates.py +2056 -2034
- package/dist/templates/trellis/scripts/common/task_store.py +1594 -1594
- package/dist/templates/trellis/scripts/common/task_utils.py +3 -3
- package/dist/templates/trellis/scripts/common/tasks.py +1 -1
- package/dist/templates/trellis/scripts/common/trellis_config.py +3 -3
- package/dist/templates/trellis/scripts/common/workflow_phase.py +1 -1
- package/dist/templates/trellis/scripts/cursor_retrieval_probe.py +3 -3
- package/dist/templates/trellis/scripts/cursor_retrieval_probe_prompt.md +11 -11
- package/dist/templates/trellis/scripts/hooks/linear_sync.py +8 -8
- package/dist/templates/trellis/scripts/init_developer.py +2 -2
- package/dist/templates/trellis/scripts/retrieval_probe_matrix_template.json +4 -4
- package/dist/templates/trellis/scripts/route_codebase_retrieval.py +1 -1
- package/dist/templates/trellis/scripts/task.py +918 -918
- package/dist/templates/trellis/tasks/templates/release-readiness/implement.md +2 -2
- package/dist/templates/trellis/workflow.md +805 -805
- package/dist/types/ai-tools.d.ts +1 -1
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +1 -1
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/types/migration.d.ts +1 -1
- package/dist/types/migration.d.ts.map +1 -1
- package/dist/utils/agents-md.d.ts +37 -0
- package/dist/utils/agents-md.d.ts.map +1 -0
- package/dist/utils/agents-md.js +82 -0
- package/dist/utils/agents-md.js.map +1 -0
- package/dist/utils/codebase-retrieval-router.js +5 -5
- package/dist/utils/codebase-retrieval-router.js.map +1 -1
- package/dist/utils/manifest-prune.d.ts +2 -2
- package/dist/utils/manifest-prune.js +4 -4
- package/dist/utils/manifest-prune.js.map +1 -1
- package/dist/utils/mirror-check.d.ts +3 -1
- package/dist/utils/mirror-check.d.ts.map +1 -1
- package/dist/utils/mirror-check.js +22 -11
- package/dist/utils/mirror-check.js.map +1 -1
- package/dist/utils/project-capabilities.d.ts +14 -3
- package/dist/utils/project-capabilities.d.ts.map +1 -1
- package/dist/utils/project-capabilities.js +127 -17
- package/dist/utils/project-capabilities.js.map +1 -1
- package/dist/utils/readiness.d.ts +10 -0
- package/dist/utils/readiness.d.ts.map +1 -1
- package/dist/utils/readiness.js +6 -3
- package/dist/utils/readiness.js.map +1 -1
- package/dist/utils/retrieval-agent-instructions.js +1 -1
- package/dist/utils/retrieval-agent-instructions.js.map +1 -1
- package/dist/utils/retrieval-execution-telemetry.js +1 -1
- package/dist/utils/retrieval-execution-telemetry.js.map +1 -1
- package/dist/utils/template-fetcher.js +1 -1
- package/dist/utils/template-fetcher.js.map +1 -1
- package/dist/utils/template-hash.d.ts +2 -2
- package/dist/utils/template-hash.d.ts.map +1 -1
- package/dist/utils/template-hash.js +12 -10
- package/dist/utils/template-hash.js.map +1 -1
- package/dist/utils/workflow-dir.d.ts +13 -0
- package/dist/utils/workflow-dir.d.ts.map +1 -0
- package/dist/utils/workflow-dir.js +35 -0
- package/dist/utils/workflow-dir.js.map +1 -0
- package/dist/utils/workflow-ownership.d.ts +36 -0
- package/dist/utils/workflow-ownership.d.ts.map +1 -0
- package/dist/utils/workflow-ownership.js +137 -0
- package/dist/utils/workflow-ownership.js.map +1 -0
- package/dist/utils/workflow-resolver.d.ts +1 -1
- package/dist/utils/workflow-resolver.js +1 -1
- package/package.json +3 -4
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +0 -83
- /package/bin/{trellis.js → cstl.js} +0 -0
- /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/mcp-setup.md +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,100 @@ SemVer: [semver.org](https://semver.org/spec/v2.0.0.html).
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
+
## [Unreleased]
|
|
13
|
+
|
|
14
|
+
## [0.3.2] - 2026-07-04
|
|
15
|
+
|
|
16
|
+
> **0.3.1 was withdrawn** shortly after publish: the initial `npm publish` did not rewrite the `workspace:*` dependency on `@blxzer/cursor-trellis-core` (and core@0.3.1 was not published alongside), so 0.3.1 was uninstallable (`EUNSUPPORTEDPROTOCOL`). 0.3.2 reissues the same content via the proper `pnpm publish` orchestration (`publish-packages.js` publishes core first, then cli, rewriting `workspace:*` to the resolved version).
|
|
17
|
+
|
|
18
|
+
**Breaking (coexistence)**: cursor-trellis runtime directory moves from `.trellis/` to **`.cstl/`** so upstream [mindfold-ai/Trellis](https://github.com/mindfold-ai/Trellis) can keep `.trellis/` in the same repository while Cursor uses `cstl`.
|
|
19
|
+
|
|
20
|
+
### Breaking
|
|
21
|
+
|
|
22
|
+
- **feat(runtime)**: project runtime root `.trellis/` → **`.cstl/`** (`rename-dir` via `cstl update --migrate`; history preserved).
|
|
23
|
+
- **feat(agents)**: AGENTS.md managed block uses `<!-- CSTL:START -->` / `<!-- CSTL:END -->` (legacy `TRELLIS:START` upgraded on migrate).
|
|
24
|
+
- **chore(channel)**: `cstl channel` multi-agent CLI is **not registered** (Cursor-only product; upstream channel runtime out of scope).
|
|
25
|
+
- **chore(config)**: removed default `channel.worker_guard` from `config.yaml` template.
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- **feat(init) coexistence mode**: when `cstl init` detects an upstream `.trellis/` (and no `.cstl/`), it creates `.cstl/` alongside, **takes over `.cursor/`** (force-writes cstl hooks/rules/commands even under `-y`), leaves `.trellis/` and other upstream platform dirs untouched, and adds a `<!-- CSTL:START -->` block to AGENTS.md **alongside** an existing `<!-- TRELLIS:START -->` block (dual-block). Prints a guidance banner warning not to run `cstl update --migrate` in coexistence repos.
|
|
30
|
+
- **feat(update) conservative migrate gate**: `cstl update --migrate` refuses the `.trellis/` → `.cstl/` rename unless a positive cursor-trellis fingerprint is present (`cstl-*` command, `cstl-triage.mdc`, or cstl-flavored `cli_adapter.py`). Mixed cursor-trellis + upstream Trellis layouts abort for manual split. New **`--force-cstl-migrate`** escape hatch overrides upstream-signal aborts (still gated on `.trellis/` existing and `.cstl/` absent).
|
|
31
|
+
|
|
32
|
+
### Migration
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install -g @blxzer/cursor-trellis@0.3.1
|
|
36
|
+
cd /path/to/project
|
|
37
|
+
cstl update --migrate
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## [0.3.1] — withdrawn (2026-07-04)
|
|
41
|
+
|
|
42
|
+
Withdrawn due to an npm publish defect (unresolvable `workspace:*` dep on `@blxzer/cursor-trellis-core` + missing core@0.3.1). Reissued as **0.3.2** with identical content. See [0.3.2] above.
|
|
43
|
+
|
|
44
|
+
## [0.3.0] - 2026-07-02
|
|
45
|
+
|
|
46
|
+
**Breaking**: rename CLI command from `trellis`/`tl` to `cstl`. The `trellis` and `tl` bin aliases are **removed**. All skill, command, agent, and rule name prefixes renamed `trellis-*` → `cstl-*` (hard cut, no compatibility aliases).
|
|
47
|
+
|
|
48
|
+
### Breaking
|
|
49
|
+
|
|
50
|
+
- **feat(cli)**: rename CLI command from `trellis`/`tl` to `cstl`. Update any aliases, CI scripts, or shell history that reference `trellis` or `tl`.
|
|
51
|
+
- **feat(templates)**: all skill, command, agent, and rule names renamed `trellis-*` → `cstl-*` (hard cut, no compatibility aliases):
|
|
52
|
+
- `.cursor/commands/trellis-continue.md` → `cstl-continue.md`
|
|
53
|
+
- `.cursor/commands/trellis-finish-work.md` → `cstl-finish-work.md`
|
|
54
|
+
- `.cursor/commands/trellis-cursor2plus-setup.md` → `cstl-cursor2plus-setup.md`
|
|
55
|
+
- `.cursor/rules/trellis-triage.mdc` → `cstl-triage.mdc`
|
|
56
|
+
- `.cursor/rules/trellis-subagent-dispatch.mdc` → `cstl-subagent-dispatch.mdc`
|
|
57
|
+
- `.cursor/agents/trellis-research.md` → `cstl-research.md`
|
|
58
|
+
- `.cursor/agents/trellis-implement.md` → `cstl-implement.md`
|
|
59
|
+
- `.cursor/agents/trellis-check.md` → `cstl-check.md`
|
|
60
|
+
- `.cursor/skills/trellis-meta/` → `cstl-meta/` (and 4 other bundled skill dirs)
|
|
61
|
+
- **fix(hooks)**: `<!-- trellis-hook-injected -->` marker → `<!-- cstl-hook-injected -->`
|
|
62
|
+
- **fix(subagents)**: `subagent_type` identifiers `trellis-research/implement/check` → `cstl-research/implement/check` (affects Cursor++ BYOK `trellis-task-models.json5` keys)
|
|
63
|
+
|
|
64
|
+
### Added
|
|
65
|
+
|
|
66
|
+
- **feat(cli)**: `cstl capability-smoke` (`--json`, `--write-status`) probes selected project capabilities and can persist `ready` / `failed` in `.trellis/capabilities.json` without losing status on later template refreshes.
|
|
67
|
+
- Migration manifest `src/migrations/manifests/0.3.0.json` (13 rename entries for `trellis-*` → `cstl-*` under `.cursor/`).
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
|
|
71
|
+
- `AUTO_PLANNING_REVIEWER` identifier `"trellis-cli"` → `"cstl-cli"`
|
|
72
|
+
- `<!-- trellis-research-end-pack -->` marker → `<!-- cstl-research-end-pack -->`
|
|
73
|
+
- `CURSOR_SKILL_RESIDUE_DIRS` in `update.ts` now checks both `cstl-*` (current) and `trellis-*` (legacy) skill directories for residue detection
|
|
74
|
+
- **feat(init/capabilities)**: selected capabilities default to `pending` in `capabilities.json` (schema v3); bootstrap/join PRDs prompt capability verification.
|
|
75
|
+
- **docs(spec)**: mirror Native OC-06/OC-15 live evidence into spec templates (`cursor-subagent-policy`, `cursor-semantic-compliance`).
|
|
76
|
+
- **docs(migration)**: README / CHANGELOG closed-loop for `npm install -g` + `cstl update --migrate`; remove stale `tl` bin alias from user docs.
|
|
77
|
+
- **docs(cursor)**: Native + BYOK **coexistence** (per-repo `--cursor2plus`, not either/or); Method 2.5 ops — run `--check-compat` after Cursor/Cursor++ upgrades (`cstl update` prints BYOK reminder when `cursor2plus/` exists).
|
|
78
|
+
- **fix(tasks)**: Parent `record-gate` / archive share the same `implement.md` contract fingerprint (fixes `stale contract fingerprint` on `parent-integrated`).
|
|
79
|
+
|
|
80
|
+
### Migration
|
|
81
|
+
|
|
82
|
+
**Manual npm install required** — the old `trellis upgrade` command no longer exists after install.
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm install -g @blxzer/cursor-trellis@latest
|
|
86
|
+
cstl update --migrate
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The `--migrate` flag is REQUIRED to trigger the file renames in your project (`trellis-*` → `cstl-*`). Renames are hash-verified; locally modified files are preserved with a warning.
|
|
90
|
+
|
|
91
|
+
New migration manifest `src/migrations/manifests/0.3.0.json` ships 13 rename entries (3 commands, 2 rules, 3 agents, 5 skill directories). See **Added** above.
|
|
92
|
+
|
|
93
|
+
If you use Cursor++ BYOK (`.trellis/local/cursor2plus/`), the `trellis-task-models.json5` keys must be updated from `trellis-research/implement/check` to `cstl-research/implement/check`. Run the `cstl-cursor2plus-setup` skill or edit `~/.ccursor/trellis-task-models.json5` manually then re-run `patch_wpelc8.py --apply`.
|
|
94
|
+
|
|
95
|
+
The `.trellis/` directory name is UNCHANGED — only the CLI command and skill/command/agent/rule name prefixes changed.
|
|
96
|
+
|
|
97
|
+
### Notes
|
|
98
|
+
|
|
99
|
+
- npm package name `@blxzer/cursor-trellis` is unchanged.
|
|
100
|
+
- `trellis-task-models.json5` filename is unchanged (user data file).
|
|
101
|
+
- `trellis_task_models_config.py` module name is unchanged.
|
|
102
|
+
- `<!-- TRELLIS:START -->` / `<!-- TRELLIS:END -->` managed block markers are unchanged.
|
|
103
|
+
|
|
104
|
+
[0.3.0]: https://github.com/blxzer77/cursor-trellis/releases/tag/v0.3.0
|
|
105
|
+
|
|
12
106
|
## [0.2.9] - 2026-06-26
|
|
13
107
|
|
|
14
108
|
Adapt `@blxzer/cursor-trellis` to **@blxzer/smart-search 0.1.15** (research locale scope, dry-run/progress, structured citations, provider TTL cache). Cursor **commands-only** policy unchanged — internal `smart-search-cli` is not exposed under `.cursor/skills/`.
|
package/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# cursor-trellis
|
|
2
2
|
|
|
3
3
|
<p>
|
|
4
|
+
<a href="https://github.com/blxzer77/cursor-trellis/actions/workflows/ci.yml">
|
|
5
|
+
<img src="https://github.com/blxzer77/cursor-trellis/actions/workflows/ci.yml/badge.svg" alt="CI">
|
|
6
|
+
</a>
|
|
4
7
|
<a href="https://www.npmjs.com/package/@blxzer/cursor-trellis">
|
|
5
8
|
<img src="https://img.shields.io/npm/v/@blxzer/cursor-trellis?label=npm%20latest" alt="npm latest">
|
|
6
9
|
</a>
|
|
@@ -11,46 +14,104 @@
|
|
|
11
14
|
|
|
12
15
|
English | [简体中文](README.zh-CN.md)
|
|
13
16
|
|
|
14
|
-
**Trellis** is a progressive context management system for AI coding agents. It structures agent instructions as `.
|
|
17
|
+
**Trellis** is a progressive context management system for AI coding agents. It structures agent instructions as `.cstl/` (workflow, specs, tasks, workspace) instead of a single large file, and generates platform-specific integration files (`.cursor/` for Cursor).
|
|
15
18
|
|
|
16
19
|
Based on the [Trellis framework by mindfold-ai](https://github.com/mindfold-ai/Trellis), this version is adapted for Cursor with rules, commands, agents, and hooks.
|
|
17
20
|
|
|
21
|
+
## Why `cstl` and `.cstl/`?
|
|
22
|
+
|
|
23
|
+
To avoid clashing with upstream [mindfold-ai/Trellis](https://github.com/mindfold-ai/Trellis) in the same repo or on the same machine:
|
|
24
|
+
|
|
25
|
+
- **CLI command `cstl`** (since v0.3.0) — replaces the `trellis` / `tl` bins so you can install and run cursor-trellis alongside upstream Trellis tooling.
|
|
26
|
+
- **Runtime directory `.cstl/`** (since v0.3.1) — holds workflow, spec, tasks, and scripts. Upstream Trellis keeps **`.trellis/`**; both trees can coexist in one repository without overwriting each other.
|
|
27
|
+
|
|
28
|
+
Fresh installs use `.cstl/` directly. Projects on 0.3.0 run `cstl update --migrate` to rename `.trellis/` → `.cstl/` (history preserved).
|
|
29
|
+
|
|
18
30
|
## What it does
|
|
19
31
|
|
|
20
|
-
- Task artifacts (PRD, design, implementation plan) persist in `.
|
|
21
|
-
- Resume work across chat sessions with `/
|
|
32
|
+
- Task artifacts (PRD, design, implementation plan) persist in `.cstl/tasks/`
|
|
33
|
+
- Resume work across chat sessions with `/cstl-continue`
|
|
22
34
|
- Load specs progressively based on files being edited
|
|
23
35
|
- Route requests through structured workflow: triage → plan → gate → execute → verify
|
|
24
|
-
- **Validated gates** — `
|
|
36
|
+
- **Validated gates** — `cstl validate-rules` + `pnpm mirror-check` enforce dogfood/template sync; `init`/`update` throw on regression
|
|
25
37
|
- **Retrieval compliance** — BYOK/Native split with conservative `unknown` routing; LSP overpromises softened to codegraph + Read; telemetry separates planned vs executed semantic
|
|
26
38
|
- **Cursor++ safety** — Method 2.5 patch requires explicit `--approve`; `--check-compat` pre-flight; `smoke.py` health check (no secrets)
|
|
27
39
|
- **Evidence pack** — finish/check cite `retrieval-pack-latest.json` when present; research prompts include provider relevance caveats
|
|
28
40
|
|
|
41
|
+
## Quick demo (~5 min)
|
|
42
|
+
|
|
43
|
+
Try Trellis on an empty app directory without touching this source tree:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm install -g @blxzer/cursor-trellis
|
|
47
|
+
cd examples/minimal-agent-app
|
|
48
|
+
./demo.sh # or demo.ps1 on Windows
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The script runs `cstl init --cursor -y` → `cstl validate-rules` → lists `.cstl/` and `.cursor/`. Details: [examples/minimal-agent-app/README.md](examples/minimal-agent-app/README.md). Agent tooling narrative (CLI / MCP / Hook / Rule): [docs/agent-tooling-narrative.zh-CN.md](docs/agent-tooling-narrative.zh-CN.md).
|
|
52
|
+
|
|
29
53
|
## Quick start (Cursor)
|
|
30
54
|
|
|
31
55
|
**1. Install the CLI** (global or project-local):
|
|
32
56
|
|
|
33
57
|
```bash
|
|
34
58
|
npm install -g @blxzer/cursor-trellis
|
|
35
|
-
|
|
59
|
+
cstl --version
|
|
36
60
|
```
|
|
37
61
|
|
|
38
62
|
**2. Initialize your application repo** (not the Trellis source tree):
|
|
39
63
|
|
|
40
64
|
```bash
|
|
41
65
|
cd /path/to/your-app
|
|
42
|
-
|
|
66
|
+
cstl init --cursor
|
|
43
67
|
```
|
|
44
68
|
|
|
45
|
-
**3. Open the project in Cursor** and use Agent mode. User-facing slash commands include `/
|
|
69
|
+
**3. Open the project in Cursor** and use Agent mode. User-facing slash commands include `/cstl-continue` and `/cstl-finish-work`. Request Triage is enforced via `.cursor/rules/cstl-triage.mdc`.
|
|
70
|
+
|
|
71
|
+
Optional: `cstl init --cursor --cursor2plus` materializes a **per-repo** Cursor++ BYOK bundle (not a global either/or choice). Native and BYOK can coexist across projects on one machine — see [Native and BYOK coexistence](docs/cursor.md#native-and-byok-coexistence-not-eitheror).
|
|
46
72
|
|
|
47
|
-
|
|
73
|
+
## Upgrade from 0.3.0 (v0.3.1)
|
|
74
|
+
|
|
75
|
+
v0.3.1 moves the cursor-trellis **runtime directory** from `.trellis/` to **`.cstl/`** so upstream [mindfold-ai/Trellis](https://github.com/mindfold-ai/Trellis) can keep `.trellis/` in the same repository. AGENTS.md managed blocks use `<!-- CSTL:START -->` markers.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm install -g @blxzer/cursor-trellis@latest
|
|
79
|
+
cd /path/to/your-app
|
|
80
|
+
cstl update --migrate
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`--migrate` is **required** — history is preserved via directory rename, not delete-recreate. Script paths become `python ./.cstl/scripts/...`.
|
|
84
|
+
|
|
85
|
+
## Upgrade from 0.2.x (v0.3.0)
|
|
86
|
+
|
|
87
|
+
v0.3.0 is a **breaking rename**. The CLI is **`cstl` only** — the `trellis` and `tl` bin aliases are removed.
|
|
88
|
+
|
|
89
|
+
| Changed | Unchanged |
|
|
90
|
+
| --- | --- |
|
|
91
|
+
| CLI: `trellis` / `tl` → `cstl` | (0.3.1+) runtime dir is `.cstl/` |
|
|
92
|
+
| Skills, commands, agents, rules: `trellis-*` → `cstl-*` | `trellis-task-models.json5` filename |
|
|
93
|
+
|
|
94
|
+
**Migration steps** (run in each project):
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npm install -g @blxzer/cursor-trellis@latest
|
|
98
|
+
cd /path/to/your-app
|
|
99
|
+
cstl update --migrate
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`--migrate` is **required** for the `trellis-*` → `cstl-*` renames under `.cursor/`. Renames are hash-verified; locally modified files are preserved with a warning — manually rename or re-apply customizations to the new `cstl-*` paths.
|
|
103
|
+
|
|
104
|
+
After 0.3.0, routine CLI bumps can use `cstl upgrade`. The old `trellis upgrade` command no longer exists once you are on 0.3.0.
|
|
105
|
+
|
|
106
|
+
**Cursor++ BYOK** (optional, `.cstl/local/cursor2plus/` only): update `trellis-task-models.json5` keys from `trellis-research/implement/check` to `cstl-research/implement/check`, then re-run `patch_wpelc8.py --apply`. Use `/cstl-cursor2plus-setup` in Agent mode.
|
|
107
|
+
|
|
108
|
+
Details: [CHANGELOG](packages/cli/CHANGELOG.md#030---2026-07-01).
|
|
48
109
|
|
|
49
110
|
## After init: what appears
|
|
50
111
|
|
|
51
112
|
```text
|
|
52
113
|
your-app/
|
|
53
|
-
.
|
|
114
|
+
.cstl/ workflow, spec, tasks, workspace, scripts
|
|
54
115
|
AGENTS.md Trellis-managed agent entry
|
|
55
116
|
.cursor/ commands, rules, agents, hooks (Cursor)
|
|
56
117
|
```
|
|
@@ -61,10 +122,10 @@ Details: [Cursor integration](docs/cursor.md).
|
|
|
61
122
|
|
|
62
123
|
| Path | Role |
|
|
63
124
|
| --- | --- |
|
|
64
|
-
| `.
|
|
65
|
-
| `.
|
|
66
|
-
| `.
|
|
67
|
-
| `.
|
|
125
|
+
| `.cstl/workflow.md` | Lifecycle: triage, plan, execute, finish, learning |
|
|
126
|
+
| `.cstl/spec/` | Layer/package coding guidelines |
|
|
127
|
+
| `.cstl/tasks/` | PRD, design, implement, verify artifacts |
|
|
128
|
+
| `.cstl/workspace/` | Developer journals and session traces |
|
|
68
129
|
|
|
69
130
|
## Workflow (summary)
|
|
70
131
|
|
|
@@ -72,7 +133,7 @@ Details: [Cursor integration](docs/cursor.md).
|
|
|
72
133
|
2. **Plan** with task artifacts for durable work (especially Full Tasks).
|
|
73
134
|
3. **Gate**: `task.py validate` + `start-execution --check`.
|
|
74
135
|
4. **Approve** execution explicitly, then `start-execution --approved`.
|
|
75
|
-
5. **Verify** and finish (`/
|
|
136
|
+
5. **Verify** and finish (`/cstl-finish-work`).
|
|
76
137
|
|
|
77
138
|
Walkthrough: [workflow.md](docs/workflow.md) — Triage decision tree, Task Ladder, upgrade/downgrade rules, Parent/Child task trees, Phase 1–3 lifecycle.
|
|
78
139
|
|
|
@@ -80,7 +141,7 @@ Walkthrough: [workflow.md](docs/workflow.md) — Triage decision tree, Task Ladd
|
|
|
80
141
|
|
|
81
142
|
- **Rules** — reliable always-on policy (including Triage and retrieval routing).
|
|
82
143
|
- **Commands** — small `/` palette (`commands-only` policy; skills not copied to `.cursor/skills/` by default).
|
|
83
|
-
- **Agents** — `
|
|
144
|
+
- **Agents** — `cstl-research`, `cstl-implement`, `cstl-check`.
|
|
84
145
|
- **Hooks** — Python scripts for session, shell, and subagent context.
|
|
85
146
|
|
|
86
147
|
Deep dive: [docs/cursor.md](docs/cursor.md) — Native vs Cursor++ BYOK environments, subagent dispatch Methods 1–4, environment detection. Retrieval layer design: [docs/retrieval.md](docs/retrieval.md).
|
|
@@ -118,9 +179,9 @@ The workflow routes external fact queries to smart-search when available. See th
|
|
|
118
179
|
|
|
119
180
|
| Command | Purpose |
|
|
120
181
|
| --- | --- |
|
|
121
|
-
| `
|
|
122
|
-
| `
|
|
123
|
-
| `
|
|
182
|
+
| `cstl init --cursor` | Create `.cstl/` + `.cursor/` in the current project |
|
|
183
|
+
| `cstl update` | Refresh templates from the installed CLI version |
|
|
184
|
+
| `cstl uninstall` | Remove Trellis-managed files from the project |
|
|
124
185
|
|
|
125
186
|
Full CLI reference: [packages/cli/README.md](packages/cli/README.md).
|
|
126
187
|
|
|
@@ -128,7 +189,7 @@ Full CLI reference: [packages/cli/README.md](packages/cli/README.md).
|
|
|
128
189
|
|
|
129
190
|
| | |
|
|
130
191
|
| --- | --- |
|
|
131
|
-
| **npm CLI** | `@blxzer/cursor-trellis` (`
|
|
192
|
+
| **npm CLI** | `@blxzer/cursor-trellis` (`cstl`) |
|
|
132
193
|
| **Core SDK** | `@blxzer/cursor-trellis-core` |
|
|
133
194
|
| **smart-search** | `@blxzer/smart-search` (auto-installed dependency) |
|
|
134
195
|
| **Repository** | https://github.com/blxzer77/cursor-trellis |
|
|
@@ -142,8 +203,11 @@ Contributors working on **this** repository:
|
|
|
142
203
|
pnpm install
|
|
143
204
|
pnpm build
|
|
144
205
|
pnpm test
|
|
206
|
+
pnpm mirror-check # dogfood .cursor vs templates (contributors)
|
|
145
207
|
```
|
|
146
208
|
|
|
209
|
+
CI runs the same pipeline on push/PR (see badge above).
|
|
210
|
+
|
|
147
211
|
Package-level detail: [packages/cli/README.md](packages/cli/README.md). Agent-oriented codebase guide: [AGENTS.md](AGENTS.md).
|
|
148
212
|
|
|
149
213
|
## Maintainer note
|
|
@@ -161,6 +225,8 @@ Local harness layout (`D:\MyHarness`), Git remote policy, release/publish, and d
|
|
|
161
225
|
| [docs/architecture.md](docs/architecture.md) | High-level structure + smart-search |
|
|
162
226
|
| [docs/skills.md](docs/skills.md) | Internal skills reference |
|
|
163
227
|
| [docs/subagents.md](docs/subagents.md) | Subagent dispatch design |
|
|
228
|
+
| [docs/agent-tooling-narrative.zh-CN.md](docs/agent-tooling-narrative.zh-CN.md) | CLI / MCP / Hook / Rule layering (ZH) |
|
|
229
|
+
| [examples/minimal-agent-app/](examples/minimal-agent-app/) | 5-minute init demo |
|
|
164
230
|
| [docs/spec-system.md](docs/spec-system.md) | Progressive spec system |
|
|
165
231
|
| [docs/task-system.md](docs/task-system.md) | Task artifacts, gates, Parent/Child |
|
|
166
232
|
| [packages/cli/README.md](packages/cli/README.md) | CLI / npm reference |
|
package/README.zh-CN.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Trellis CLI 的 npm 包。项目总览:[../../README.zh-CN.md](../../README.zh-CN.md)。Cursor 工作流:[../../docs/workflow.zh-CN.md](../../docs/workflow.zh-CN.md)。
|
|
6
6
|
|
|
7
|
+
**为何 `cstl` 与 `.cstl/`?** CLI 为 `cstl`(非 `trellis`),运行时目录为 `.cstl/`(非 `.trellis/`),以便与上游 Trellis 在同一仓库共存。详见[仓库 README](../../README.zh-CN.md#为何使用-cstl-与-cstl)。
|
|
8
|
+
|
|
7
9
|
## 安装
|
|
8
10
|
|
|
9
11
|
```bash
|
|
@@ -12,15 +14,52 @@ npm install -g @blxzer/cursor-trellis
|
|
|
12
14
|
|
|
13
15
|
需要 **Node.js ≥ 18.17**。生成项目的钩子在运行 Cursor 的机器上需要 **Python ≥ 3.9**。
|
|
14
16
|
|
|
17
|
+
## 从 0.3.0 升级(v0.3.1)
|
|
18
|
+
|
|
19
|
+
v0.3.1 将 cursor-trellis **运行时目录**从 `.trellis/` 迁至 **`.cstl/`**。
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install -g @blxzer/cursor-trellis@latest
|
|
23
|
+
cd /path/to/your-app
|
|
24
|
+
cstl update --migrate
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`--migrate` **必须**带上;历史通过目录 rename 保留。脚本路径为 `python ./.cstl/scripts/...`。
|
|
28
|
+
|
|
29
|
+
## 从 0.2.x 升级(v0.3.0)
|
|
30
|
+
|
|
31
|
+
v0.3.0 为**硬切更名**:CLI 仅保留 **`cstl`**,`trellis` 与 `tl` 两个 bin 别名已移除。
|
|
32
|
+
|
|
33
|
+
| 变了 | 没变 |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| CLI:`trellis` / `tl` → `cstl` | (0.3.1+)运行时目录为 `.cstl/` |
|
|
36
|
+
| skill / command / agent / rule:`trellis-*` → `cstl-*` | `trellis-task-models.json5` 文件名 |
|
|
37
|
+
|
|
38
|
+
**迁移步骤**(每个项目执行一次):
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install -g @blxzer/cursor-trellis@latest
|
|
42
|
+
cd /path/to/your-app
|
|
43
|
+
cstl update --migrate
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`--migrate` **必须**带上,才会重命名 `.cursor/` 下的 `trellis-*` → `cstl-*`。重命名经哈希校验;若你本地改过文件,会保留旧路径并警告——请手动改名或把自定义内容迁到新的 `cstl-*` 路径。
|
|
47
|
+
|
|
48
|
+
0.3.0 之后日常 CLI 小版本可用 `cstl upgrade`。升级到 0.3.0 后,旧的 `trellis upgrade` 命令已不存在。
|
|
49
|
+
|
|
50
|
+
**Cursor++ BYOK**(可选,仅 `.cstl/local/cursor2plus/`):将 `trellis-task-models.json5` 中的 `trellis-research/implement/check` 键改为 `cstl-research/implement/check`,然后重跑 `patch_wpelc8.py --apply`。可在 Agent 模式使用 `/cstl-cursor2plus-setup`。
|
|
51
|
+
|
|
52
|
+
详见 [CHANGELOG](./CHANGELOG.md#030---2026-07-01)。
|
|
53
|
+
|
|
15
54
|
## 可执行文件
|
|
16
55
|
|
|
17
|
-
| Bin |
|
|
18
|
-
| --- | --- |
|
|
19
|
-
| `
|
|
20
|
-
| `smart-search` |
|
|
56
|
+
| Bin | 作用 |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| `cstl` | 在项目中初始化、更新、管理 Trellis |
|
|
59
|
+
| `smart-search` | 随包分发的网页检索 CLI(见 [smart-search](#smart-search)) |
|
|
21
60
|
|
|
22
61
|
```bash
|
|
23
|
-
|
|
62
|
+
cstl --version
|
|
24
63
|
smart-search --version
|
|
25
64
|
```
|
|
26
65
|
|
|
@@ -28,25 +67,25 @@ smart-search --version
|
|
|
28
67
|
|
|
29
68
|
| 命令 | 用途 |
|
|
30
69
|
| --- | --- |
|
|
31
|
-
| `init` | 创建 `.
|
|
70
|
+
| `init` | 创建 `.cstl/` 与所选平台目录 |
|
|
32
71
|
| `update` | 将模板同步到当前安装的 CLI 版本 |
|
|
33
72
|
| `uninstall` | 从项目中移除 Trellis 管理文件 |
|
|
34
73
|
| `upgrade` | 升级全局 CLI npm 包 |
|
|
35
74
|
| `rollout` | 对多个项目路径批量 `update` |
|
|
36
75
|
| `workflow` | 工作流模板工具(进阶) |
|
|
37
76
|
|
|
38
|
-
与 **channel** 相关的命令服务于进阶多 Agent 工作流,不属于 Cursor-first 公开文档范围。完整列表:`
|
|
77
|
+
与 **channel** 相关的命令服务于进阶多 Agent 工作流,不属于 Cursor-first 公开文档范围。完整列表:`cstl --help`。
|
|
39
78
|
|
|
40
79
|
下文详述 **`init`**、**`update`**、**`uninstall`**。
|
|
41
80
|
|
|
42
81
|
---
|
|
43
82
|
|
|
44
|
-
## `
|
|
83
|
+
## `cstl init`
|
|
45
84
|
|
|
46
85
|
在**目标项目根目录**执行:
|
|
47
86
|
|
|
48
87
|
```bash
|
|
49
|
-
|
|
88
|
+
cstl init --cursor
|
|
50
89
|
```
|
|
51
90
|
|
|
52
91
|
### 平台标志
|
|
@@ -69,26 +108,26 @@ trellis init --cursor
|
|
|
69
108
|
| `-u, --user <name>` | 开发者身份 |
|
|
70
109
|
| `--skip-readiness` | 跳过 smart-search / 能力项 readiness |
|
|
71
110
|
| `--capability <id>` | 启用可选能力(可重复;`all` 表示全部可选) |
|
|
72
|
-
| `--workflow <id>` | `.
|
|
111
|
+
| `--workflow <id>` | `.cstl/workflow.md` 工作流模板 |
|
|
73
112
|
| `-t, --template <name>` | 远程 spec 模板 |
|
|
74
113
|
| `-r, --registry <source>` | 自定义模板 registry |
|
|
75
114
|
| `--monorepo` / `--no-monorepo` | monorepo 检测覆盖 |
|
|
76
115
|
|
|
77
116
|
### 生成内容
|
|
78
117
|
|
|
79
|
-
- `.
|
|
118
|
+
- `.cstl/` — workflow、spec、tasks、workspace、scripts、模板哈希
|
|
80
119
|
- `AGENTS.md` — 受管说明块
|
|
81
120
|
- 平台目录 — Cursor 下为 `.cursor/commands`、`rules`、`agents`、`hooks`、`hooks.json`、`worktrees.json`
|
|
82
121
|
|
|
83
122
|
---
|
|
84
123
|
|
|
85
|
-
## `
|
|
124
|
+
## `cstl update`
|
|
86
125
|
|
|
87
|
-
在已有 `.
|
|
126
|
+
在已有 `.cstl/` 的项目根目录:
|
|
88
127
|
|
|
89
128
|
```bash
|
|
90
|
-
|
|
91
|
-
|
|
129
|
+
cstl update
|
|
130
|
+
cstl update --dry-run
|
|
92
131
|
```
|
|
93
132
|
|
|
94
133
|
### 标志
|
|
@@ -105,16 +144,16 @@ trellis update --dry-run
|
|
|
105
144
|
| `--json` | 单行 JSON rollout 证据 |
|
|
106
145
|
| `--skip-post-update-smoke` | 跳过应用后 Python 冒烟脚本 |
|
|
107
146
|
|
|
108
|
-
常见流程:升级全局 CLI → 进入项目 → `
|
|
147
|
+
常见流程:升级全局 CLI → 进入项目 → `cstl update`(从 0.2.x 首次升到 0.3.0 须加 `--migrate`)→ 若自定义过 workflow/rules 请审阅 diff。
|
|
109
148
|
|
|
110
149
|
---
|
|
111
150
|
|
|
112
|
-
## `
|
|
151
|
+
## `cstl uninstall`
|
|
113
152
|
|
|
114
153
|
```bash
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
154
|
+
cstl uninstall
|
|
155
|
+
cstl uninstall --dry-run
|
|
156
|
+
cstl uninstall -y
|
|
118
157
|
```
|
|
119
158
|
|
|
120
159
|
### 标志
|
|
@@ -124,7 +163,7 @@ trellis uninstall -y
|
|
|
124
163
|
| `-y, --yes` | 跳过确认 |
|
|
125
164
|
| `--dry-run` | 仅列出将删除/_scrub_ 的内容 |
|
|
126
165
|
|
|
127
|
-
按哈希清单与结构化 scrubber 移除受管平台文件及 `.
|
|
166
|
+
按哈希清单与结构化 scrubber 移除受管平台文件及 `.cstl/`。卸载前请**备份**自定义 workflow 或 rules。
|
|
128
167
|
|
|
129
168
|
---
|
|
130
169
|
|
package/bin/smart-search.js
CHANGED
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAIhE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
2
|
import chalk from "chalk";
|
|
4
3
|
import { Command } from "commander";
|
|
4
|
+
import { ensureCapabilitiesFileExists, runCapabilitySmokeCommand, } from "../commands/capability-smoke.js";
|
|
5
5
|
import { init } from "../commands/init.js";
|
|
6
6
|
import { update } from "../commands/update.js";
|
|
7
7
|
import { rollout } from "../commands/rollout.js";
|
|
8
8
|
import { upgrade } from "../commands/upgrade.js";
|
|
9
9
|
import { uninstall } from "../commands/uninstall.js";
|
|
10
10
|
import { runWorkflowCommand, WorkflowCommandError, } from "../commands/workflow.js";
|
|
11
|
-
import { registerChannelCommand } from "../commands/channel/index.js";
|
|
11
|
+
// import { registerChannelCommand } from "../commands/channel/index.js";
|
|
12
12
|
import { runValidateRules } from "../commands/validate-rules.js";
|
|
13
|
-
import {
|
|
13
|
+
import { isWorkflowInitialized, workflowPath } from "../utils/workflow-dir.js";
|
|
14
14
|
import { PACKAGE_NAME, VERSION } from "../constants/version.js";
|
|
15
15
|
import { compareVersions } from "../utils/compare-versions.js";
|
|
16
16
|
// Re-export for backwards compatibility (consumers should prefer constants/version.js)
|
|
@@ -19,8 +19,8 @@ export { VERSION, PACKAGE_NAME };
|
|
|
19
19
|
* Check if a Trellis update is available (compare project version with CLI version)
|
|
20
20
|
*/
|
|
21
21
|
function checkForUpdates(cwd) {
|
|
22
|
-
const versionFile =
|
|
23
|
-
if (!fs.existsSync(versionFile))
|
|
22
|
+
const versionFile = workflowPath(cwd, ".version");
|
|
23
|
+
if (!versionFile || !fs.existsSync(versionFile))
|
|
24
24
|
return;
|
|
25
25
|
const projectVersion = fs.readFileSync(versionFile, "utf-8").trim();
|
|
26
26
|
const cliVersion = VERSION;
|
|
@@ -28,17 +28,17 @@ function checkForUpdates(cwd) {
|
|
|
28
28
|
if (comparison > 0) {
|
|
29
29
|
// CLI is newer than project - update available
|
|
30
30
|
console.log(chalk.yellow(`\n⚠️ Trellis update available: ${projectVersion} → ${cliVersion}`));
|
|
31
|
-
console.log(chalk.gray(` Run:
|
|
31
|
+
console.log(chalk.gray(` Run: cstl update\n`));
|
|
32
32
|
}
|
|
33
33
|
else if (comparison < 0) {
|
|
34
34
|
// CLI is older than project - CLI needs updating
|
|
35
35
|
console.log(chalk.yellow(`\n⚠️ Your CLI (${cliVersion}) is older than project (${projectVersion})`));
|
|
36
|
-
console.log(chalk.gray(` Run:
|
|
36
|
+
console.log(chalk.gray(` Run: cstl upgrade\n`));
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
// Check for updates at CLI startup
|
|
39
|
+
// Check for updates at CLI startup when a workflow dir exists
|
|
40
40
|
const cwd = process.cwd();
|
|
41
|
-
if (
|
|
41
|
+
if (isWorkflowInitialized(cwd)) {
|
|
42
42
|
checkForUpdates(cwd);
|
|
43
43
|
}
|
|
44
44
|
const program = new Command();
|
|
@@ -46,7 +46,7 @@ function collectOption(value, previous) {
|
|
|
46
46
|
return [...previous, value];
|
|
47
47
|
}
|
|
48
48
|
program
|
|
49
|
-
.name("
|
|
49
|
+
.name("cstl")
|
|
50
50
|
.description("AI-assisted development workflow framework for Cursor")
|
|
51
51
|
.version(VERSION, "-v, --version", "output the version number");
|
|
52
52
|
program
|
|
@@ -54,7 +54,7 @@ program
|
|
|
54
54
|
.description("Initialize trellis in the current project")
|
|
55
55
|
.option("--cursor", "Include Cursor commands")
|
|
56
56
|
.option("-y, --yes", "Skip prompts and use defaults")
|
|
57
|
-
.option("--cursor2plus", "Materialize Cursor++ BYOK local bundle (.
|
|
57
|
+
.option("--cursor2plus", "Materialize Cursor++ BYOK local bundle (.cstl/local/cursor2plus/); ignored unless --cursor is also selected")
|
|
58
58
|
.option("-u, --user <name>", "Initialize developer identity with specified name")
|
|
59
59
|
.option("-f, --force", "Overwrite existing files without asking")
|
|
60
60
|
.option("-s, --skip-existing", "Skip existing files without asking")
|
|
@@ -66,7 +66,7 @@ program
|
|
|
66
66
|
.option("--overwrite", "Overwrite existing spec directory when using template")
|
|
67
67
|
.option("--append", "Only add missing files when using template")
|
|
68
68
|
.option("-r, --registry <source>", "Use a custom template registry (e.g., gh:myorg/myrepo/specs)")
|
|
69
|
-
.option("--workflow <id>", "Workflow template id for .
|
|
69
|
+
.option("--workflow <id>", "Workflow template id for .cstl/workflow.md (default: native; e.g., tdd, channel-driven-subagent-dispatch)")
|
|
70
70
|
.option("--workflow-source <source>", "Custom marketplace source for the --workflow lookup (e.g., gh:myorg/myrepo/marketplace)")
|
|
71
71
|
.action(async (options) => {
|
|
72
72
|
try {
|
|
@@ -80,6 +80,31 @@ program
|
|
|
80
80
|
process.exit(1);
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
|
+
program
|
|
84
|
+
.command("capability-smoke")
|
|
85
|
+
.description("Verify selected project capabilities and optionally write readiness statuses")
|
|
86
|
+
.option("--json", "Emit machine-readable capability smoke output")
|
|
87
|
+
.option("--write-status", "Write ready/failed status back to .cstl/capabilities.json and capabilities.md")
|
|
88
|
+
.action(async (options) => {
|
|
89
|
+
try {
|
|
90
|
+
ensureCapabilitiesFileExists(process.cwd());
|
|
91
|
+
const report = await runCapabilitySmokeCommand({
|
|
92
|
+
cwd: process.cwd(),
|
|
93
|
+
json: options.json,
|
|
94
|
+
writeStatus: options.writeStatus,
|
|
95
|
+
});
|
|
96
|
+
if (!report.ok) {
|
|
97
|
+
process.exit(1);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
console.error(chalk.red("Error:"), error instanceof Error ? error.message : error);
|
|
102
|
+
if (process.env.DEBUG || process.env.TRELLIS_DEBUG) {
|
|
103
|
+
console.error(error instanceof Error ? error.stack : error);
|
|
104
|
+
}
|
|
105
|
+
process.exit(1);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
83
108
|
program
|
|
84
109
|
.command("update")
|
|
85
110
|
.description("Update trellis configuration and commands to latest version")
|
|
@@ -92,6 +117,7 @@ program
|
|
|
92
117
|
.option("--skip-readiness", "Skip Smart Search and selected capability readiness checks and report framework readiness as unverified")
|
|
93
118
|
.option("--json", "Emit one-line JSON rollout evidence (dry-run or apply)")
|
|
94
119
|
.option("--skip-post-update-smoke", "Skip post-apply Python script smoke checks")
|
|
120
|
+
.option("--force-cstl-migrate", "Force the .trellis/ → .cstl/ rename even when upstream Trellis signals are detected (escape hatch)")
|
|
95
121
|
.action(async (options) => {
|
|
96
122
|
try {
|
|
97
123
|
await update({
|
|
@@ -104,6 +130,7 @@ program
|
|
|
104
130
|
skipReadiness: options.skipReadiness,
|
|
105
131
|
json: options.json,
|
|
106
132
|
skipPostUpdateSmoke: options.skipPostUpdateSmoke,
|
|
133
|
+
forceCstlMigrate: options.forceCstlMigrate,
|
|
107
134
|
});
|
|
108
135
|
}
|
|
109
136
|
catch (error) {
|
|
@@ -116,8 +143,8 @@ program
|
|
|
116
143
|
});
|
|
117
144
|
program
|
|
118
145
|
.command("rollout")
|
|
119
|
-
.description("Run
|
|
120
|
-
.requiredOption("-p, --project <path>", "Project root with .
|
|
146
|
+
.description("Run cstl update across multiple project paths and aggregate rollout evidence")
|
|
147
|
+
.requiredOption("-p, --project <path>", "Project root with .cstl/ (repeatable)", (val, prev) => [...(prev ?? []), val], [])
|
|
121
148
|
.option("--dry-run", "Preview updates without applying")
|
|
122
149
|
.option("-f, --force", "Overwrite all changed files without asking")
|
|
123
150
|
.option("-s, --skip-all", "Skip all changed files without asking")
|
|
@@ -174,7 +201,7 @@ program
|
|
|
174
201
|
});
|
|
175
202
|
program
|
|
176
203
|
.command("uninstall")
|
|
177
|
-
.description("Remove all trellis files (managed platform files + .
|
|
204
|
+
.description("Remove all trellis files (managed platform files + .cstl/) from this project")
|
|
178
205
|
.option("-y, --yes", "Skip confirmation prompt")
|
|
179
206
|
.option("--dry-run", "List what would be removed without changing anything")
|
|
180
207
|
.action(async (options) => {
|
|
@@ -194,12 +221,12 @@ program
|
|
|
194
221
|
});
|
|
195
222
|
program
|
|
196
223
|
.command("workflow")
|
|
197
|
-
.description("List or switch the project's .
|
|
224
|
+
.description("List or switch the project's .cstl/workflow.md template (native, tdd, channel-driven-subagent-dispatch, or marketplace)")
|
|
198
225
|
.option("-t, --template <id>", "Workflow template id (e.g., native, tdd, channel-driven-subagent-dispatch)")
|
|
199
226
|
.option("-m, --marketplace <source>", "Custom marketplace source (e.g., gh:myorg/myrepo/marketplace)")
|
|
200
227
|
.option("--list", "List available workflow templates and exit")
|
|
201
228
|
.option("-f, --force", "Overwrite a modified workflow.md without asking")
|
|
202
|
-
.option("-n, --create-new", "Write .
|
|
229
|
+
.option("-n, --create-new", "Write .cstl/workflow.md.new instead of replacing the active workflow")
|
|
203
230
|
.action(async (options) => {
|
|
204
231
|
try {
|
|
205
232
|
await runWorkflowCommand({
|
|
@@ -222,7 +249,8 @@ program
|
|
|
222
249
|
process.exit(1);
|
|
223
250
|
}
|
|
224
251
|
});
|
|
225
|
-
|
|
252
|
+
// Cursor-only product: multi-agent `channel` runtime is upstream Trellis scope; not registered.
|
|
253
|
+
// registerChannelCommand(program);
|
|
226
254
|
program
|
|
227
255
|
.command("validate-rules")
|
|
228
256
|
.description("Validate Cursor .cursor/rules against the expected manifest (templates and/or installed rules)")
|