@blxzer/cursor-trellis 0.4.1 → 0.4.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 +25 -0
- package/README.md +3 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +7 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +10 -41
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/constants/paths.d.ts +4 -0
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +4 -0
- package/dist/constants/paths.js.map +1 -1
- package/dist/templates/common/bundled-skills/cstl-check/SKILL.md +1 -1
- package/dist/templates/common/bundled-skills/cstl-cursor2plus-setup/SKILL.md +1 -1
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/hooks-and-settings.md +2 -2
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/overview.md +1 -1
- package/dist/templates/common/commands/continue.md +1 -1
- package/dist/templates/common/skills/brainstorm.md +2 -2
- package/dist/templates/cursor/agents/cstl-check.md +2 -2
- package/dist/templates/cursor/agents/cstl-implement.md +1 -1
- package/dist/templates/cursor/agents/cstl-research.md +1 -1
- package/dist/templates/cursor/commands/cursor2plus-setup.md +1 -1
- package/dist/templates/cursor/rules/cstl-cursor-modes.mdc +2 -2
- package/dist/templates/cursor/rules/retrieval-routing.mdc +1 -1
- package/dist/templates/markdown/agents.md +30 -2
- package/dist/templates/markdown/{spec/guides → framework}/cursor-native-modes-guide.md.txt +2 -2
- package/dist/templates/markdown/{spec/guides → framework}/cursor-subagent-policy.md.txt +1 -1
- package/dist/templates/markdown/framework/dogfood-only-surfaces.md.txt +31 -0
- package/dist/templates/markdown/framework/index.md.txt +27 -0
- package/dist/templates/markdown/framework/internal-skills-cursor-reachability.md.txt +44 -0
- package/dist/templates/markdown/framework/prd-grill-frontier.md.txt +83 -0
- package/dist/templates/markdown/{spec/guides → framework}/verification-strength-guide.md.txt +2 -2
- package/dist/templates/markdown/index.d.ts +22 -10
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +70 -11
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/markdown/prompts/run-semantic-slice-12.md.txt +1 -1
- package/dist/templates/markdown/spec/guides/index.md.txt +5 -13
- package/dist/templates/markdown/spec/guides/prototype-guide.md.txt +10 -10
- package/dist/templates/markdown/spec/guides/test-discipline-guide.md.txt +1 -1
- package/dist/templates/shared-hooks/session-start.py +1 -1
- package/dist/templates/trellis/config.yaml +1 -1
- package/dist/templates/trellis/local/README.md +2 -2
- package/dist/templates/trellis/scripts/common/parent_orchestration.py +1 -1
- package/dist/templates/trellis/scripts/common/task_store.py +7 -5
- package/dist/templates/trellis/scripts/common/test_observable_defaults.py +10 -4
- package/dist/templates/trellis/scripts/cursor_retrieval_probe_prompt.md +4 -5
- package/dist/templates/trellis/workflow.md +15 -11
- package/dist/utils/retrieval-execution-telemetry.js +1 -1
- package/dist/utils/retrieval-execution-telemetry.js.map +1 -1
- package/package.json +2 -2
- package/dist/templates/markdown/spec/guides/cursor-trellis-release-coexistence-guide.md.txt +0 -166
- package/dist/templates/markdown/spec/guides/goal-release-regression-runbook.md.txt +0 -132
- /package/dist/templates/markdown/{spec/guides → framework}/artifact-locale-guide.md.txt +0 -0
- /package/dist/templates/markdown/{spec/guides → framework}/cursor-context-injection-guide.md.txt +0 -0
- /package/dist/templates/markdown/{spec/guides → framework}/cursor-semantic-compliance.md.txt +0 -0
- /package/dist/templates/markdown/{spec/guides → framework}/execution-strategy.md.txt +0 -0
- /package/dist/templates/markdown/{spec/guides → framework}/injection-budget-guide.md.txt +0 -0
- /package/dist/templates/markdown/{spec/guides → framework}/retrieval-daily-guide.md.txt +0 -0
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
# cursor-trellis Release & Coexistence Guide
|
|
2
|
-
|
|
3
|
-
> **Audience**: Maintainers and agents working on `@blxzer/cursor-trellis` in `D:\MyHarness\cursor-trellis`.
|
|
4
|
-
> **Scope**: npm publish runbook, git tag naming (`cstl-v*`), and upstream Trellis coexistence semantics (0.3.2+).
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## 1. npm publish runbook (mandatory)
|
|
9
|
-
|
|
10
|
-
cursor-trellis ships **two** npm packages at the **same version**:
|
|
11
|
-
|
|
12
|
-
| Package | Role |
|
|
13
|
-
| --- | --- |
|
|
14
|
-
| `@blxzer/cursor-trellis-core` | SDK (must publish **first**) |
|
|
15
|
-
| `@blxzer/cursor-trellis` | CLI (depends on core) |
|
|
16
|
-
|
|
17
|
-
### Do
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
cd D:\MyHarness\cursor-trellis\packages\cli
|
|
21
|
-
|
|
22
|
-
# 1. Version parity (cli + core package.json must match)
|
|
23
|
-
cd ../.. && pnpm release:check
|
|
24
|
-
|
|
25
|
-
# 2. Optional: dry-run pack shape (rewrites workspace:* in tarball)
|
|
26
|
-
node packages/cli/scripts/publish-packages.js --dry-run
|
|
27
|
-
|
|
28
|
-
# 3. Publish both packages in dependency order
|
|
29
|
-
node packages/cli/scripts/publish-packages.js
|
|
30
|
-
|
|
31
|
-
# 4. Verify registry visibility
|
|
32
|
-
node packages/cli/scripts/release-preflight.js verify-npm --package all
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
`publish-packages.js` uses **`pnpm publish`** (not bare `npm publish`). pnpm rewrites `workspace:*` dependencies to the resolved semver (e.g. `"@blxzer/cursor-trellis-core": "0.3.3"`). Bare `npm publish` leaves `workspace:*` in the tarball → **`EUNSUPPORTEDPROTOCOL`** on install.
|
|
36
|
-
|
|
37
|
-
### Do not
|
|
38
|
-
|
|
39
|
-
- **`npm publish`** from `packages/cli` alone (0.3.1 incident: cli tarball had `workspace:*`, core was missing).
|
|
40
|
-
- Publish cli before core (cli install fails with ETARGET until core exists).
|
|
41
|
-
- Skip `prepublishOnly` (runs test + build + copy-release-assets on cli).
|
|
42
|
-
|
|
43
|
-
### Preflight commands
|
|
44
|
-
|
|
45
|
-
| Command | Purpose |
|
|
46
|
-
| --- | --- |
|
|
47
|
-
| `release-preflight.js check-versions` | cli/core version match |
|
|
48
|
-
| `release-preflight.js verify-packed-cli` | Packed cli resolves core to exact semver (not `workspace:*`) |
|
|
49
|
-
| `release-preflight.js verify-npm` | Post-publish registry check |
|
|
50
|
-
| `release-preflight.js publish-plan` | Idempotent CI plan (skip already-published versions) |
|
|
51
|
-
|
|
52
|
-
### Withdrawn / deprecated versions
|
|
53
|
-
|
|
54
|
-
- **0.3.1 cli**: withdrawn (unpublish); use **0.3.2+**.
|
|
55
|
-
- **0.3.1 core**: cannot unpublish (npm policy); **`npm deprecate`** applied — use `@latest`.
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## 2. Git tags (`cstl-v*` prefix)
|
|
60
|
-
|
|
61
|
-
This repo shares git history with legacy `@blxzer/trellis` (1.x). Old tags `v0.3.x`–`v0.6.x` point at **trellis** commits, not cursor-trellis releases.
|
|
62
|
-
|
|
63
|
-
| Tag pattern | Product | Example |
|
|
64
|
-
| --- | --- | --- |
|
|
65
|
-
| `v*` (legacy) | `@blxzer/trellis` | `v0.3.2` @ 2026-03 trellis commit |
|
|
66
|
-
| **`cstl-v*`** | `@blxzer/cursor-trellis` | `cstl-v0.3.2` @ cursor-trellis release commit |
|
|
67
|
-
|
|
68
|
-
`packages/cli/scripts/release.js` tags releases as **`cstl-v${version}`** (since 0.3.2 tag-hygiene commit).
|
|
69
|
-
|
|
70
|
-
`release-preflight tagVersionFromEnv` extracts semver from tag suffix (`cstl-v0.3.2` → `0.3.2`).
|
|
71
|
-
|
|
72
|
-
**CI publish workflow** (`.github/workflows/publish.yml`): triggers on `push.tags: cstl-v*`. Requires repo secret `NPM_TOKEN`.
|
|
73
|
-
|
|
74
|
-
Do **not** delete legacy `v*` tags — they are historical trellis releases.
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## 3. Coexistence with upstream mindfold-ai/Trellis
|
|
79
|
-
|
|
80
|
-
**Product decision**: Both are workflow frameworks. **Cursor configuration belongs to cursor-trellis**. Upstream Trellis keeps `.trellis/` and non-Cursor platform dirs; cursor-trellis uses `.cstl/` + `.cursor/cstl-*`.
|
|
81
|
-
|
|
82
|
-
### Scenario matrix
|
|
83
|
-
|
|
84
|
-
| Scenario | User state | Action |
|
|
85
|
-
| --- | --- | --- |
|
|
86
|
-
| 1 Pure cstl | Only cursor-trellis (legacy `.trellis/` runtime) | `cstl update --migrate` → rename `.trellis/` → `.cstl/` |
|
|
87
|
-
| 2 Coexistence | Upstream `.trellis/` + wants Cursor cstl | `cstl init --cursor` → creates `.cstl/`, **takes over `.cursor/`**, AGENTS dual-block |
|
|
88
|
-
| 3 Fresh | Never used either | `cstl init --cursor` → `.cstl/` only |
|
|
89
|
-
|
|
90
|
-
### `cstl init` coexistence mode
|
|
91
|
-
|
|
92
|
-
When `.trellis/` exists and `.cstl/` does not:
|
|
93
|
-
|
|
94
|
-
1. Creates `.cstl/` (does not touch `.trellis/`).
|
|
95
|
-
2. **Force-writes** `.cursor/` (hooks, rules, commands) even under `-y`.
|
|
96
|
-
3. **AGENTS.md dual-block**: preserves `<!-- TRELLIS:START -->`, adds/refreshes `<!-- CSTL:START -->` (`insertCstlManagedBlock`).
|
|
97
|
-
4. Prints banner: do **not** run `cstl update --migrate` (would rename upstream `.trellis/`).
|
|
98
|
-
|
|
99
|
-
### Migrate gate (`assessCstlDirectoryMigrate`)
|
|
100
|
-
|
|
101
|
-
Conservative by default for `.trellis/` → `.cstl/` rename:
|
|
102
|
-
|
|
103
|
-
| Signal | Meaning |
|
|
104
|
-
| --- | --- |
|
|
105
|
-
| F1 | `.cursor/commands/cstl-*.md` |
|
|
106
|
-
| F2 | `.cursor/rules/cstl-triage.mdc` |
|
|
107
|
-
| F3 | `.trellis/scripts/common/cli_adapter.py` contains `cstl` |
|
|
108
|
-
| U1 | `.claude/agents/trellis-implement.md` |
|
|
109
|
-
| U2 | Non-Cursor platform `trellis-*` agents/skills |
|
|
110
|
-
| U4 | `.cursor/commands/trellis-*.md` without cstl fingerprint |
|
|
111
|
-
|
|
112
|
-
- No F fingerprint → **abort** (protect scenario 2).
|
|
113
|
-
- F + U mixed → **abort** (manual split).
|
|
114
|
-
- Escape: `cstl update --force-cstl-migrate`.
|
|
115
|
-
|
|
116
|
-
### AGENTS.md hash tracking (block-level)
|
|
117
|
-
|
|
118
|
-
`.template-hashes.json` stores **CSTL block hash only** for `AGENTS.md`, not the whole file. Upstream edits to TRELLIS block or user content outside CSTL block do **not** trigger "modified" on `cstl update`.
|
|
119
|
-
|
|
120
|
-
Implementation: `template-hash.ts` → `hashContentForPath` + `extractBlock(CSTL:START/END)`.
|
|
121
|
-
|
|
122
|
-
### `cstl uninstall` in coexistence repos
|
|
123
|
-
|
|
124
|
-
- Strips **CSTL block only** (`removeCstlManagedBlock`); keeps TRELLIS block + user content.
|
|
125
|
-
- If file was only the CSTL block → deletes `AGENTS.md`.
|
|
126
|
-
- Does **not** restore upstream `.cursor/` files overwritten during init (by design: cstl owned Cursor).
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## 4. Post-release dogfood checklist
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
npm install -g @blxzer/cursor-trellis@latest
|
|
134
|
-
cstl --version
|
|
135
|
-
|
|
136
|
-
# Each dogfood project (no --migrate unless upgrading from pre-0.3.1):
|
|
137
|
-
cd <project>
|
|
138
|
-
cstl update --skip-readiness --skip-all
|
|
139
|
-
# Confirm .cstl/.version matches npm latest
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Sandbox smoke (from empty dir):
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
npm init -y && npm install @blxzer/cursor-trellis@latest
|
|
146
|
-
npx cstl init --yes --skip-readiness --cursor
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## 5. Related files (source of truth)
|
|
152
|
-
|
|
153
|
-
| Topic | Path |
|
|
154
|
-
| --- | --- |
|
|
155
|
-
| Publish orchestration | `cursor-trellis/packages/cli/scripts/publish-packages.js` |
|
|
156
|
-
| Release preflight | `cursor-trellis/packages/cli/scripts/release-preflight.js` |
|
|
157
|
-
| Tag prefix | `cursor-trellis/packages/cli/scripts/release.js` |
|
|
158
|
-
| Coexistence init | `packages/cli/src/commands/init.ts` |
|
|
159
|
-
| Migrate gate | `packages/cli/src/utils/workflow-ownership.ts` |
|
|
160
|
-
| AGENTS helpers | `packages/cli/src/utils/agents-md.ts` |
|
|
161
|
-
| Block-level hash | `packages/cli/src/utils/template-hash.ts` |
|
|
162
|
-
| Uninstall strip | `packages/cli/src/commands/uninstall.ts` |
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
**Last updated**: 2026-07-04 (0.3.3 follow-up: uninstall CSTL strip + block hash + this guide).
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# Goal 发布回归 Runbook
|
|
2
|
-
|
|
3
|
-
> **受众**:Root npm 闸、Parent 集成前自检、维护者。
|
|
4
|
-
> **范围**:`cstl goal` 回归 checklist — **不扩展 Goal 功能**,仅钉死 hardening 命令。
|
|
5
|
-
> **基线**:`cursor-trellis` `main`(A1/A2 合并后 tip);harness 侧 `.cstl/spec/Trellis/framework/cstl-goal-*.md`。
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 1. 发布门语义
|
|
10
|
-
|
|
11
|
-
| 项 | 说明 |
|
|
12
|
-
| --- | --- |
|
|
13
|
-
| **用途** | npm 发布前 Goal 回归闸;Parent `verify.md` 可链接本页 |
|
|
14
|
-
| **非目标** | 不新增 runner/worker 能力;不替代 [cursor-trellis release runbook](./cursor-trellis-release-coexistence-guide.md) |
|
|
15
|
-
| **通过标准** | Mock 路径全绿(§2);Live 路径(§3)为可选加分项 |
|
|
16
|
-
| **零功能 diff** | 本闸仅文档与命令;**不得**附带 `cursor-trellis/packages/cli/src/goal/*` 语义变更 |
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## 2. Mock 路径(必须 — 无需 `CURSOR_API_KEY`)
|
|
21
|
-
|
|
22
|
-
在 harness 根目录执行。CI / 新人 onboarding 至少跑完本节。
|
|
23
|
-
|
|
24
|
-
### 2.1 全量 Goal 测试
|
|
25
|
-
|
|
26
|
-
```powershell
|
|
27
|
-
cd cursor-trellis/packages/cli
|
|
28
|
-
pnpm test goal/
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
**期望:** 7 个 test files、32 tests 全部 PASS。
|
|
32
|
-
|
|
33
|
-
### 2.2 Golden + 墙单元测试
|
|
34
|
-
|
|
35
|
-
```powershell
|
|
36
|
-
cd cursor-trellis/packages/cli
|
|
37
|
-
pnpm exec vitest run test/goal/reviewer-golden.test.ts test/goal/walls.test.ts
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
**期望:**
|
|
41
|
-
|
|
42
|
-
- `mis-allow gate is zero on hard-deny bucket` 通过
|
|
43
|
-
- `walls.test.ts` 墙钟逻辑通过
|
|
44
|
-
|
|
45
|
-
### 2.3 墙 smoke 脚本语法
|
|
46
|
-
|
|
47
|
-
```powershell
|
|
48
|
-
python -m py_compile .cstl/scripts/goal_wall_smoke.py
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### 2.4 可选 — 墙钟 crash 可复现 smoke
|
|
52
|
-
|
|
53
|
-
需已有 goal run 目录(`goal_id` 来自历史 hardening 或本地狗粮):
|
|
54
|
-
|
|
55
|
-
```powershell
|
|
56
|
-
python ./.cstl/scripts/goal_wall_smoke.py <goal_id> --mode window --json
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
**期望:** JSON 中 `ok: true`;`audit.log` 含 `wall-clock reached`。
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## 3. Live 路径(可选 — 需要 `CURSOR_API_KEY`)
|
|
64
|
-
|
|
65
|
-
仅当维护者显式同意 live SDK 狗粮时执行。Cursor Agent shell **默认不继承** User 级环境变量,须先加载:
|
|
66
|
-
|
|
67
|
-
```powershell
|
|
68
|
-
$env:CURSOR_API_KEY = [Environment]::GetEnvironmentVariable('CURSOR_API_KEY','User')
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### 3.1 Preflight → Accept → Run
|
|
72
|
-
|
|
73
|
-
```powershell
|
|
74
|
-
cstl goal preflight --goal "..." --json
|
|
75
|
-
cstl goal accept <goal_id>
|
|
76
|
-
cstl goal run <goal_id> --max-steps 1 --json
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
CI 风格可用 mock worker(无需 live SDK):
|
|
80
|
-
|
|
81
|
-
```powershell
|
|
82
|
-
cstl goal run <goal_id> --mock-worker --max-steps 1 --json
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
若全局 `cstl` 未 link 最新 dist,改用本地 CLI:
|
|
86
|
-
|
|
87
|
-
```powershell
|
|
88
|
-
node cursor-trellis/packages/cli/dist/cli/index.js goal preflight --goal "..." --json
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
## 4. 契约引用
|
|
94
|
-
|
|
95
|
-
回归失败时对照合同,勿在发布闸中改语义:
|
|
96
|
-
|
|
97
|
-
| 文档 | 路径 |
|
|
98
|
-
| --- | --- |
|
|
99
|
-
| cstl-goal 验收合同 | [`.cstl/spec/Trellis/framework/cstl-goal-contract.md`](../Trellis/framework/cstl-goal-contract.md) |
|
|
100
|
-
| Action Packet | [`.cstl/spec/Trellis/framework/cstl-goal-action-packet.md`](../Trellis/framework/cstl-goal-action-packet.md) |
|
|
101
|
-
| Golden 用例 | `cursor-trellis/packages/cli/test/fixtures/goal-reviewer-golden/cases.json` |
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## 5. SDK 残余风险(须诚实记录)
|
|
106
|
-
|
|
107
|
-
| 来源 | 结论 |
|
|
108
|
-
| --- | --- |
|
|
109
|
-
| `@cursor/sdk` `Agent.prompt` | `sdk-client.ts` 包装为**单次** `Promise`,**无** mid-run cancel / abort 参数 |
|
|
110
|
-
| Goal SDK worker | `worker.ts` 仅外层 `withTimeout(..., ctx.timeoutMs)` |
|
|
111
|
-
| smart-search docs 探针(2026-08-07) | 未发现官方 mid-run cancel API — **按 timeout-only 风险处理** |
|
|
112
|
-
|
|
113
|
-
**实践建议:**
|
|
114
|
-
|
|
115
|
-
- Live 回归控制 `--max-steps` 与 wall 配置
|
|
116
|
-
- 长步无法保证 turn 中途取消;超时后进程可能仍占用资源直至 Promise settle
|
|
117
|
-
- 无 key 环境一律用 `--mock-worker` 或 §2 Mock 路径
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
|
-
## 6. 快速 Checklist
|
|
122
|
-
|
|
123
|
-
- [ ] `pnpm test goal/` — 32 PASS
|
|
124
|
-
- [ ] `reviewer-golden.test.ts` + `walls.test.ts` — PASS
|
|
125
|
-
- [ ] `python -m py_compile .cstl/scripts/goal_wall_smoke.py` — OK
|
|
126
|
-
- [ ] (可选)`goal_wall_smoke.py <goal_id> --mode window --json` — `ok: true`
|
|
127
|
-
- [ ] (可选 live)`cstl goal preflight` / `accept` / `run --max-steps 1`
|
|
128
|
-
- [ ] **无** `cursor-trellis/packages/cli/src/goal/*` 功能 diff
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
**来源:** `08-06-cstl-p2-goal-hardening/verify.md` · Parent `08-07-cstl-parent-orch-visibility` §5.2
|
|
File without changes
|
/package/dist/templates/markdown/{spec/guides → framework}/cursor-context-injection-guide.md.txt
RENAMED
|
File without changes
|
/package/dist/templates/markdown/{spec/guides → framework}/cursor-semantic-compliance.md.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|