@blxzer/cursor-trellis 0.3.6 → 0.4.0
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 +23 -0
- package/README.md +6 -6
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +5 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +39 -2
- 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/migrations/manifests/0.4.0.json +9 -0
- package/dist/templates/markdown/index.d.ts +6 -0
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +6 -0
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/markdown/spec/guides/artifact-locale-guide.md.txt +93 -0
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +7 -7
- package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +10 -8
- package/dist/templates/markdown/spec/guides/debug-loop-guide.md.txt +227 -0
- package/dist/templates/markdown/spec/guides/goal-release-regression-runbook.md.txt +132 -0
- package/dist/templates/markdown/spec/guides/index.md.txt +37 -0
- package/dist/templates/markdown/spec/guides/prototype-guide.md.txt +139 -0
- package/dist/templates/markdown/spec/guides/retrieval-daily-guide.md.txt +4 -0
- package/dist/templates/markdown/spec/guides/test-discipline-guide.md.txt +138 -0
- package/dist/templates/markdown/spec/guides/verification-strength-guide.md.txt +1 -0
- package/dist/templates/trellis/index.d.ts +12 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +26 -0
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/pool/README.md +103 -0
- package/dist/templates/trellis/pool/items/.gitkeep +0 -0
- package/dist/templates/trellis/pool/plan.md +26 -0
- package/dist/templates/trellis/scripts/common/pool_store.py +702 -0
- package/dist/templates/trellis/scripts/common/task_dashboard.py +8 -0
- package/dist/templates/trellis/scripts/common/task_dependencies.py +673 -0
- package/dist/templates/trellis/scripts/common/task_gates.py +58 -5
- package/dist/templates/trellis/scripts/common/task_store.py +256 -0
- package/dist/templates/trellis/scripts/common/test_depends_mode_block.py +489 -0
- package/dist/templates/trellis/scripts/common/test_pool_store.py +428 -0
- package/dist/templates/trellis/scripts/common/test_task_dependencies.py +345 -0
- package/dist/templates/trellis/scripts/pool.py +192 -0
- package/dist/templates/trellis/scripts/task.py +66 -1
- package/dist/templates/trellis/scripts/verify_evidence_probe.py +138 -0
- package/dist/templates/trellis/workflow.md +32 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/constants/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,mCAAmC;AACnC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,8BAA8B;IAC9B,QAAQ,EAAE,OAAO;IACjB,gEAAgE;IAChE,SAAS,EAAE,WAAW;IACtB,4DAA4D;IAC5D,KAAK,EAAE,OAAO;IACd,uCAAuC;IACvC,OAAO,EAAE,SAAS;IAClB,+CAA+C;IAC/C,IAAI,EAAE,MAAM;IACZ,uCAAuC;IACvC,OAAO,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/constants/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,mCAAmC;AACnC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,8BAA8B;IAC9B,QAAQ,EAAE,OAAO;IACjB,gEAAgE;IAChE,SAAS,EAAE,WAAW;IACtB,4DAA4D;IAC5D,KAAK,EAAE,OAAO;IACd,uCAAuC;IACvC,OAAO,EAAE,SAAS;IAClB,+CAA+C;IAC/C,IAAI,EAAE,MAAM;IACZ,uCAAuC;IACvC,OA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EX;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,SAAiB;IAC/C,OAAO,GAAG,KAAK,CAAC,SAAS,IAAI,SAAS,EAAE,CAAC;AAC3C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,OAAO,GAAG,KAAK,CAAC,KAAK,IAAI,QAAQ,EAAE,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,GAAG,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.4.0",
|
|
3
|
+
"description": "Review pool + task depends_on Plan A/B, workflow/guides alignment",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**@blxzer/cursor-trellis 0.4.0**\n\n- feat(pool): `.cstl/pool/` skeleton + `pool.py` validate/link/plan-check\n- feat(deps): `set-deps` / `set-depends-mode` / `--ignore-deps` (Plan A warn / Plan B block)\n- feat(verify): ship `verify_evidence_probe.py`\n- docs: workflow pool boundary + depends; guides (locale/debug/prototype/test/runbook)\n- chore: empty migrations list (template sync via `cstl update`)",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Run `cstl update` to sync scripts/workflow/pool skeleton. No `--migrate` required. Pool items remain user data."
|
|
9
|
+
}
|
|
@@ -33,4 +33,10 @@ export declare const guidesCursorContextInjectionGuideContent: string;
|
|
|
33
33
|
export declare const guidesCursorNativeModesGuideContent: string;
|
|
34
34
|
export declare const guidesVerificationStrengthGuideContent: string;
|
|
35
35
|
export declare const guidesInjectionBudgetGuideContent: string;
|
|
36
|
+
export declare const guidesArtifactLocaleGuideContent: string;
|
|
37
|
+
export declare const guidesDebugLoopGuideContent: string;
|
|
38
|
+
export declare const guidesGoalReleaseRegressionRunbookContent: string;
|
|
39
|
+
export declare const guidesPrototypeGuideContent: string;
|
|
40
|
+
export declare const guidesTestDisciplineGuideContent: string;
|
|
41
|
+
export declare const guidesCrossPlatformThinkingGuideContent: string;
|
|
36
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/markdown/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAqBH,eAAO,MAAM,eAAe,EAAE,MAAuC,CAAC;AAGtE,eAAO,MAAM,qBAAqB,EAAE,MACK,CAAC;AAG1C,eAAO,MAAM,yBAAyB,QAAwB,CAAC;AAG/D,eAAO,MAAM,wBAAwB,EAAE,MACH,CAAC;AAQrC,eAAO,MAAM,mBAAmB,EAAE,MAEjC,CAAC;AACF,eAAO,MAAM,gCAAgC,EAAE,MAE9C,CAAC;AACF,eAAO,MAAM,gCAAgC,EAAE,MAE9C,CAAC;AACF,eAAO,MAAM,+BAA+B,EAAE,MAE7C,CAAC;AACF,eAAO,MAAM,+BAA+B,EAAE,MAE7C,CAAC;AACF,eAAO,MAAM,2BAA2B,EAAE,MAEzC,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE,MAElC,CAAC;AACF,eAAO,MAAM,iCAAiC,EAAE,MAE/C,CAAC;AACF,eAAO,MAAM,yBAAyB,EAAE,MAEvC,CAAC;AACF,eAAO,MAAM,6BAA6B,EAAE,MAE3C,CAAC;AACF,eAAO,MAAM,kCAAkC,EAAE,MAEhD,CAAC;AACF,eAAO,MAAM,gCAAgC,EAAE,MAE9C,CAAC;AACF,eAAO,MAAM,8BAA8B,EAAE,MAE5C,CAAC;AAGF,eAAO,MAAM,kBAAkB,EAAE,MAEhC,CAAC;AACF,eAAO,MAAM,oCAAoC,EAAE,MAElD,CAAC;AACF,eAAO,MAAM,mCAAmC,EAAE,MAEjD,CAAC;AACF,eAAO,MAAM,yCAAyC,EAAE,MACiB,CAAC;AAC1E,eAAO,MAAM,gCAAgC,EAAE,MAE9C,CAAC;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oCAAoC,EAAE,MAElD,CAAC;AACF,eAAO,MAAM,mCAAmC,EAAE,MAEjD,CAAC;AACF,eAAO,MAAM,yCAAyC,EAAE,MACiB,CAAC;AAC1E,eAAO,MAAM,gCAAgC,EAAE,MAE9C,CAAC;AACF,eAAO,MAAM,qCAAqC,EAAE,MAEnD,CAAC;AACF,eAAO,MAAM,iCAAiC,EAAE,MAE/C,CAAC;AACF,eAAO,MAAM,8BAA8B,EAAE,MAE5C,CAAC;AACF,eAAO,MAAM,wCAAwC,EAAE,MACiB,CAAC;AACzE,eAAO,MAAM,mCAAmC,EAAE,MAEjD,CAAC;AACF,eAAO,MAAM,sCAAsC,EAAE,MAEpD,CAAC;AACF,eAAO,MAAM,iCAAiC,EAAE,MAE/C,CAAC;AACF,eAAO,MAAM,gCAAgC,EAAE,MAE9C,CAAC;AACF,eAAO,MAAM,2BAA2B,EAAE,MAEzC,CAAC;AACF,eAAO,MAAM,yCAAyC,EAAE,MACiB,CAAC;AAC1E,eAAO,MAAM,2BAA2B,EAAE,MAEzC,CAAC;AACF,eAAO,MAAM,gCAAgC,EAAE,MAE9C,CAAC;AACF,eAAO,MAAM,uCAAuC,EAAE,MACiB,CAAC"}
|
|
@@ -58,4 +58,10 @@ export const guidesCursorContextInjectionGuideContent = readLocalTemplate("spec/
|
|
|
58
58
|
export const guidesCursorNativeModesGuideContent = readLocalTemplate("spec/guides/cursor-native-modes-guide.md.txt");
|
|
59
59
|
export const guidesVerificationStrengthGuideContent = readLocalTemplate("spec/guides/verification-strength-guide.md.txt");
|
|
60
60
|
export const guidesInjectionBudgetGuideContent = readLocalTemplate("spec/guides/injection-budget-guide.md.txt");
|
|
61
|
+
export const guidesArtifactLocaleGuideContent = readLocalTemplate("spec/guides/artifact-locale-guide.md.txt");
|
|
62
|
+
export const guidesDebugLoopGuideContent = readLocalTemplate("spec/guides/debug-loop-guide.md.txt");
|
|
63
|
+
export const guidesGoalReleaseRegressionRunbookContent = readLocalTemplate("spec/guides/goal-release-regression-runbook.md.txt");
|
|
64
|
+
export const guidesPrototypeGuideContent = readLocalTemplate("spec/guides/prototype-guide.md.txt");
|
|
65
|
+
export const guidesTestDisciplineGuideContent = readLocalTemplate("spec/guides/test-discipline-guide.md.txt");
|
|
66
|
+
export const guidesCrossPlatformThinkingGuideContent = readLocalTemplate("spec/guides/cross-platform-thinking-guide.md.txt");
|
|
61
67
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/markdown/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,SAAS,iBAAiB,CAAC,QAAgB;IACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC3C,OAAO,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC;AAED,gFAAgF;AAChF,8BAA8B;AAC9B,gFAAgF;AAEhF,MAAM,CAAC,MAAM,eAAe,GAAW,iBAAiB,CAAC,WAAW,CAAC,CAAC;AAEtE,oDAAoD;AACpD,MAAM,CAAC,MAAM,qBAAqB,GAChC,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;AAE1C,gCAAgC;AAChC,MAAM,CAAC,MAAM,yBAAyB,GAAG,qBAAqB,CAAC;AAE/D,2DAA2D;AAC3D,MAAM,CAAC,MAAM,wBAAwB,GACnC,iBAAiB,CAAC,eAAe,CAAC,CAAC;AAErC,gFAAgF;AAChF,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C,CAAC;AACF,MAAM,CAAC,MAAM,yCAAyC,GACpD,iBAAiB,CAAC,oDAAoD,CAAC,CAAC;AAC1E,MAAM,CAAC,MAAM,2BAA2B,GAAW,iBAAiB,CAClE,oCAAoC,CACrC,CAAC;AACF,MAAM,CAAC,MAAM,gCAAgC,GAAW,iBAAiB,CACvE,0CAA0C,CAC3C,CAAC;AACF,MAAM,CAAC,MAAM,uCAAuC,GAClD,iBAAiB,CAAC,kDAAkD,CAAC,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Human-Reviewed Artifact Locale Guide
|
|
2
|
+
|
|
3
|
+
> **Purpose:** Let PRD / DESIGN / IMPLEMENT / VERIFY / HANDOFF follow the user's language (Chinese or English) without turning Trellis into a full i18n product.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Non-goals
|
|
8
|
+
|
|
9
|
+
| In scope | Out of scope |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| Workspace / task `artifact_locale` | Full CLI `--help` / stderr i18n |
|
|
12
|
+
| `task.py create` PRD seed language | Auto-translating archived tasks |
|
|
13
|
+
| Session / planning hints for artifact language | Bilingual mirrors of `workflow.md` or `.cursor/rules` |
|
|
14
|
+
| `prd.md` / `design.md` / `implement.md` / `verify.md` / `handoff.md` | `task.json` field names or gate enums |
|
|
15
|
+
|
|
16
|
+
**Rollback:** `python ./.cstl/scripts/task.py artifact-locale set zh` or remove `artifact_locale` from `.cstl/config.yaml`. For a single task, delete `task.json` → `meta.artifact_locale`.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 2. Configuration
|
|
21
|
+
|
|
22
|
+
### Workspace default (`.cstl/config.yaml`)
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
# Human-reviewed artifact locale (zh | en)
|
|
26
|
+
artifact_locale: zh
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Default when unset: **`zh`** (matches current dogfood and User Rules for Simplified Chinese replies).
|
|
30
|
+
|
|
31
|
+
### CLI
|
|
32
|
+
|
|
33
|
+
```powershell
|
|
34
|
+
# Resolved locale (workspace default)
|
|
35
|
+
python ./.cstl/scripts/task.py artifact-locale get
|
|
36
|
+
|
|
37
|
+
# Resolved locale for one task (includes task override)
|
|
38
|
+
python ./.cstl/scripts/task.py artifact-locale get --task .cstl/tasks/<dir>
|
|
39
|
+
|
|
40
|
+
# Workspace default
|
|
41
|
+
python ./.cstl/scripts/task.py artifact-locale set en
|
|
42
|
+
python ./.cstl/scripts/task.py artifact-locale set zh
|
|
43
|
+
|
|
44
|
+
# Per-task override
|
|
45
|
+
python ./.cstl/scripts/task.py artifact-locale set zh --task .cstl/tasks/<dir>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Invalid values print a warning and fall back to the next layer (`task` → `workspace` → `zh`).
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 3. What respects locale
|
|
53
|
+
|
|
54
|
+
| Artifact | Mechanism |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `prd.md` on `task.py create` | Locale template under `.cstl/tasks/locale/{zh,en}/default-prd.md` |
|
|
57
|
+
| `design.md` / `implement.md` | Agent planning (session context + `cstl-brainstorm`) |
|
|
58
|
+
| `verify.md` / `handoff.md` | Agent execution / finish (same session hint) |
|
|
59
|
+
| Optional `tasks/templates/*` copies | Agent follows guide; English paths stay canonical |
|
|
60
|
+
|
|
61
|
+
**Does not change:** existing files in a task directory, CLI diagnostics, hooks, or machine gate names.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 4. Dogfood checklist
|
|
66
|
+
|
|
67
|
+
1. `artifact-locale set en` → `task.py create "Locale EN" --slug locale-dogfood-en` → `prd.md` uses `## Goal`, `## Requirements`.
|
|
68
|
+
2. `artifact-locale set zh` → `task.py create "Locale ZH" --slug locale-dogfood-zh` → `prd.md` uses `## 目标`, `## 需求`.
|
|
69
|
+
3. With workspace `en`, `artifact-locale set zh --task <dir>` → next create for that task only uses Chinese if `meta.artifact_locale` was set before create (override applies to resolved locale for that task).
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 5. Orthogonal `locale` settings
|
|
74
|
+
|
|
75
|
+
| Setting | Purpose |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| **`artifact_locale`** (this guide) | Human-reviewed task artifacts |
|
|
78
|
+
| Retrieval / semantic `locale` | Code search ranking and plan language |
|
|
79
|
+
| smart-search `locale-scope` | External research evidence language |
|
|
80
|
+
|
|
81
|
+
Do not merge these keys; they solve different problems.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## 6. Rollback
|
|
86
|
+
|
|
87
|
+
1. `artifact-locale set zh` (workspace).
|
|
88
|
+
2. Remove `meta.artifact_locale` from any task that should follow workspace only.
|
|
89
|
+
3. Revert code/templates if needed — default `zh` keeps dogfood behavior without config.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
**Core principle:** Product language follows the user for artifacts they review; infrastructure stays English unless explicitly scoped.
|
|
@@ -40,7 +40,7 @@ print("Run: script.py <args>")
|
|
|
40
40
|
|
|
41
41
|
# GOOD - Platform-aware wording
|
|
42
42
|
print("Usage: python on Windows, python3 elsewhere")
|
|
43
|
-
print("Run: {{PYTHON_CMD}} ./.
|
|
43
|
+
print("Run: {{PYTHON_CMD}} ./.trellis/scripts/task.py <args>")
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
**Rule 2**: When generating config files at init time, use placeholder + platform detection:
|
|
@@ -281,7 +281,7 @@ make the intended decision. Otherwise a transient sandbox/network failure hides
|
|
|
281
281
|
the hint for the rest of the session.
|
|
282
282
|
|
|
283
283
|
**Rule 2**: If a local command can provide the needed value, try it with a short
|
|
284
|
-
timeout and captured output. For example, `
|
|
284
|
+
timeout and captured output. For example, `trellis --version` already runs the
|
|
285
285
|
CLI's version comparison logic and can support an actionable update prompt
|
|
286
286
|
without duplicating npm registry parsing.
|
|
287
287
|
|
|
@@ -356,7 +356,7 @@ When making platform-related changes, check **all these locations**:
|
|
|
356
356
|
|
|
357
357
|
### Code Locations
|
|
358
358
|
- [ ] `src/templates/` - Template files for new projects
|
|
359
|
-
- [ ] `.
|
|
359
|
+
- [ ] `.trellis/scripts/` - Project's own scripts (if self-hosting)
|
|
360
360
|
- [ ] `dist/` - Built output (rebuild after changes)
|
|
361
361
|
|
|
362
362
|
### Search Pattern
|
|
@@ -530,7 +530,7 @@ subprocess.run(["./script.py"]) # FileNotFoundError
|
|
|
530
530
|
|
|
531
531
|
```
|
|
532
532
|
src/templates/script.py ← Updated
|
|
533
|
-
.
|
|
533
|
+
.trellis/scripts/script.py ← Forgot to sync!
|
|
534
534
|
```
|
|
535
535
|
|
|
536
536
|
### 4. "Python 3 is always python3"
|
|
@@ -606,8 +606,8 @@ included with Trellis, verify the whole distribution path:
|
|
|
606
606
|
- [ ] `pnpm build` copies the asset into `dist/templates/**`.
|
|
607
607
|
- [ ] `npm pack --dry-run --json` includes the expected `dist/**` path.
|
|
608
608
|
- [ ] The built binary installs the asset in a fresh temp repository.
|
|
609
|
-
- [ ] `.
|
|
610
|
-
- [ ] `
|
|
609
|
+
- [ ] `.trellis/.template-hashes.json` tracks the generated asset path.
|
|
610
|
+
- [ ] `trellis update --dry-run` reports `Already up to date!` in that temp
|
|
611
611
|
repository.
|
|
612
612
|
|
|
613
613
|
**Why this matters**: docs/changelog text can move independently from the code
|
|
@@ -628,7 +628,7 @@ git -C "$tmpdir" init -q
|
|
|
628
628
|
cd "$tmpdir"
|
|
629
629
|
node /path/to/Trellis/packages/cli/bin/trellis.js init -u smoke --yes --cursor
|
|
630
630
|
test -f .cursor/skills/<skill>/SKILL.md
|
|
631
|
-
grep -q '<skill>' .
|
|
631
|
+
grep -q '<skill>' .trellis/.template-hashes.json
|
|
632
632
|
node /path/to/Trellis/packages/cli/bin/trellis.js update --dry-run
|
|
633
633
|
)
|
|
634
634
|
```
|
|
@@ -96,19 +96,21 @@ When research is purely **codebase exploration** (no external web search, no fil
|
|
|
96
96
|
|
|
97
97
|
### Method 2.5: Cursor++ BYOK proxy map (publishable bundle)
|
|
98
98
|
|
|
99
|
-
**What it is:** A reversible patch to Cursor++ `extension.js` resolver
|
|
99
|
+
**What it is:** A reversible patch to Cursor++ `extension.js` **subagent model resolver** that maps `subagentType` → BYOK catalog **slug** (`model-xxxxx`), evaluated **before** the inherit-parent branch. Obfuscated symbol names change per build (historical `WPeLc8`; 2026-08+ profile `ZiKp4I`). Script uses multi-profile detection.
|
|
100
100
|
|
|
101
|
-
**Trellis ships (every `cstl init` / `cstl update`, strategy C):** `.cstl/local/cursor2plus/` — `patch_wpelc8.py`, `README.md`, `config.local.json.example`. Native Cursor API users can ignore this directory.
|
|
101
|
+
**Trellis ships (every `cstl init` / `cstl update`, strategy C):** `.cstl/local/cursor2plus/` — `patch_wpelc8.py`, `README.md`, **`UPGRADE-NOTE.md`** (upgrade re-apply), `config.local.json.example`. Native Cursor API users can ignore this directory.
|
|
102
102
|
|
|
103
103
|
**Operator workflow (Cursor++ BYOK only):**
|
|
104
104
|
|
|
105
|
-
1. Fill **`~/.ccursor/trellis-task-models.
|
|
106
|
-
2. Optionally override per repo: **`.cstl/local/subagent-models.
|
|
105
|
+
1. Fill **`~/.ccursor/trellis-task-models.json5`** (user-wide) with `subagent_type` → displayName/apiModel from **`~/.ccursor/providers.json`**.
|
|
106
|
+
2. Optionally override per repo: **`.cstl/local/subagent-models.json5`** (project wins on same key).
|
|
107
107
|
3. If paths are not auto-detected: copy `config.local.json.example` → `config.local.json`, or run `python patch_wpelc8.py --bootstrap`, or set `TRELLIS_CCURSOR_HOME` / `TRELLIS_CURSOR2PLUS_EXTENSION`.
|
|
108
|
-
4. From `.cstl/local/cursor2plus/`: `python patch_wpelc8.py --print-map` →
|
|
109
|
-
5. **Verify:**
|
|
108
|
+
4. From `.cstl/local/cursor2plus/`: `python patch_wpelc8.py --check-compat` → `--print-map` → `--apply --approve` → **Developer: Reload Window**.
|
|
109
|
+
5. **Verify:** A≠B probe (parent model ≠ map target) or `resolvedModelId` matches slug.
|
|
110
110
|
|
|
111
|
-
**Revert:** `python patch_wpelc8.py --revert`; Reload Window.
|
|
111
|
+
**Revert:** `python patch_wpelc8.py --revert`; Reload Window.
|
|
112
|
+
|
|
113
|
+
**After any Cursor / Cursor++ upgrade:** assume patch is stale — follow **`.cstl/local/cursor2plus/UPGRADE-NOTE.md`** (`--check-compat`, re-apply, or add a new resolver profile if symbols moved).
|
|
112
114
|
|
|
113
115
|
**Cursor++ sidebar / Cursor Settings:** Do **not** wire `cstl-*` BYOK routing; use JSON + patch.
|
|
114
116
|
|
|
@@ -203,7 +205,7 @@ When a dispatch is imminent:
|
|
|
203
205
|
|
|
204
206
|
### Technical note
|
|
205
207
|
|
|
206
|
-
Client layer still only builds override rows for built-in types such as `explore`. Cursor Settings entries for custom agent **names** do not reach the BYOK proxy override list for `cstl-*`. **Method 2.5** patches Cursor++ `
|
|
208
|
+
Client layer still only builds override rows for built-in types such as `explore`. Cursor Settings entries for custom agent **names** do not reach the BYOK proxy override list for `cstl-*`. **Method 2.5** patches Cursor++ subagent model resolver (profile-bound; see `UPGRADE-NOTE.md`) so `taskToolCall` sets `resolvedModelId` from a local `subagentType → slug` table before inherit-parent. **Method 3** bypasses Task routing (user picks model in a new chat).
|
|
207
209
|
|
|
208
210
|
---
|
|
209
211
|
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# Debug Loop Guide
|
|
2
|
+
|
|
3
|
+
> **Purpose**: 调试纪律 —— 先建 tight、red-capable 反馈环,再假设、再修,一次到位找到并修对;与 `cstl-break-loop` 划界(诊断进行中 vs 修完后防再发),互不替代。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Purpose / Non-goals
|
|
8
|
+
|
|
9
|
+
**Purpose.** Hard bugs and performance regressions are not solved by reading code — they are solved by building a **tight, red-capable feedback loop** first, then letting hypotheses consume it. This guide defines the discipline: build the loop → reproduce → hypothesise → probe one variable at a time → freeze the loop as a regression → clean up and hand off to prevention.
|
|
10
|
+
|
|
11
|
+
**Non-goals**
|
|
12
|
+
|
|
13
|
+
- **Not a mandate for every bug.** A lightweight bug (obvious at a glance, provable in a single step) may skip the full loop — but you must state **one sentence** explaining why the full cycle was skipped.
|
|
14
|
+
- **Not a replacement for `cstl-break-loop`.** This guide owns *diagnosis in progress*; break-loop owns *post-fix root cause classification / prevention / knowledge capture* (see §2).
|
|
15
|
+
- **No production instrumentation** unless the user explicitly permits it. If you cannot build a loop without instrumenting production, stop and ask (see Phase 1 "genuinely cannot build a loop").
|
|
16
|
+
- **Not TDD ceremony.** Phase 5 freezes the loop as a test *or* a repeatable command — whichever is the correct seam.
|
|
17
|
+
|
|
18
|
+
## 2. Boundary with cstl-break-loop
|
|
19
|
+
|
|
20
|
+
| | **debug-loop-guide** (this guide) | **cstl-break-loop** |
|
|
21
|
+
| --- | --- | --- |
|
|
22
|
+
| 时机 | 诊断与修复**进行中**(建环 → 修) | 修复**完成后**(深分析) |
|
|
23
|
+
| 目标 | 一次到位找到并修对(red 环、假设表、修复、清理) | 根因分类(A–E)、为何修失败、防再发机制、入 spec |
|
|
24
|
+
| 输出 | 红环、3–5 假设排名、修复、回归、清理 | 5 维分析、prevention、knowledge capture 到 guides |
|
|
25
|
+
| 触发 | 用户报 bug / 性能回归,进入诊断 | `/cstl:break-loop` 或修完后的任务收尾 |
|
|
26
|
+
|
|
27
|
+
**二者不互相替代**:debug-loop-guide 结束时若只修完没做根因分类,同类 bug 会再发;cstl-break-loop 不帮你找到原因(它在修完之后才启动)。Phase 6 的 post-mortem 钩子负责把两者接起来。
|
|
28
|
+
|
|
29
|
+
## 3. Hard rule: no red-capable loop → no hypotheses
|
|
30
|
+
|
|
31
|
+
> **硬纪律:无 red-capable 反馈环,不得进入假设阶段;禁止先读代码猜原因。**
|
|
32
|
+
|
|
33
|
+
A **red-capable** loop is **one command** that you have **already run at least once** (show the invocation and its redacted output), and that simultaneously:
|
|
34
|
+
|
|
35
|
+
- **Drives the path of the user's symptom** — it exercises the actual bug code path, not "it didn't crash".
|
|
36
|
+
- **Can go red and green** — it goes red on *this* bug and turns green once fixed.
|
|
37
|
+
- **Is as deterministic, fast, and agent-runnable as possible** — seconds, unattended; a human in the loop only via the PowerShell HITL template (§12).
|
|
38
|
+
|
|
39
|
+
If you catch yourself reading code to build a theory before this command exists — **stop**. Jumping straight to a hypothesis is the exact failure this discipline prevents. No red-capable command, no Phase 2.
|
|
40
|
+
|
|
41
|
+
**If you genuinely cannot build a loop**: stop and say so explicitly. List what you tried. Ask the user for (a) access to the environment that reproduces it, (b) a redacted captured artifact (HAR file, log dump, core dump, screen recording with timestamps), or (c) **explicit permission** to add temporary production instrumentation. Do **not** proceed to hypothesise without a loop.
|
|
42
|
+
|
|
43
|
+
## 4. Lightweight escape hatch
|
|
44
|
+
|
|
45
|
+
A lightweight bug — one visible at a glance, provable in a single step (typo, obvious off-by-one, missing export) — may skip the full cycle. The only requirement: **one sentence explaining why the full loop was skipped** (e.g. "single-line typo, provable by one compile run; full loop skipped"). Hard bugs and performance regressions **default to the full loop**.
|
|
46
|
+
|
|
47
|
+
## 5. Redact
|
|
48
|
+
|
|
49
|
+
This guide makes you show commands, outputs and captured artifacts. **Redact every secret first** — write `<REDACTED>` in its place.
|
|
50
|
+
|
|
51
|
+
- Build loops against **env vars** so credentials stay in the environment, never in what you show.
|
|
52
|
+
- Captured artifacts carry auth headers: **quote only the lines that carry the signal**, not the whole blob.
|
|
53
|
+
- If the redacted output is not enough to diagnose the bug, say so and ask the user — do not leak secrets to move faster.
|
|
54
|
+
|
|
55
|
+
## 6. Phase 1 — Build a tight feedback loop
|
|
56
|
+
|
|
57
|
+
**This is the phase.** Everything else is mechanical. If you have a **tight** pass/fail signal for the bug — one that goes red on *this* bug — you will find the cause; bisection, hypothesis-testing, and instrumentation just consume it. If you don't have one, no amount of staring at code will save you. Spend disproportionate effort here. **Be aggressive. Be creative. Refuse to give up.**
|
|
58
|
+
|
|
59
|
+
### Ways to construct one — try them in roughly this order
|
|
60
|
+
|
|
61
|
+
1. **Failing test** at whatever seam reaches the bug — unit, integration, e2e.
|
|
62
|
+
2. **Curl / HTTP script** against a running dev server.
|
|
63
|
+
3. **CLI invocation** with a fixture input, diffing stdout against a known-good snapshot.
|
|
64
|
+
4. **Headless browser script** (Playwright / Puppeteer) — drives the UI, asserts on DOM/console/network.
|
|
65
|
+
5. **Replay a captured trace.** Save a real network request / payload / event log to disk; replay it through the code path in isolation.
|
|
66
|
+
6. **Throwaway harness.** Spin up a minimal subset of the system (one service, mocked deps) that exercises the bug code path with a single function call.
|
|
67
|
+
7. **Property / fuzz loop.** If the bug is "sometimes wrong output", run 1000 random inputs and look for the failure mode.
|
|
68
|
+
8. **Bisection harness.** If the bug appeared between two known states (commit, dataset, version), automate "boot at state X, check, repeat" so you can bisect it.
|
|
69
|
+
9. **Differential loop.** Run the same input through old-version vs new-version (or two configs) and diff outputs.
|
|
70
|
+
10. **HITL PowerShell script** (§12). Last resort. If a human must click, drive *them* with a structured loop so it is still a loop. Captured output feeds back to you.
|
|
71
|
+
|
|
72
|
+
### Tighten the loop
|
|
73
|
+
|
|
74
|
+
Treat the loop as a product. Once you have *a* loop, **tighten** it:
|
|
75
|
+
|
|
76
|
+
- Can I make it **faster**? (Cache setup, skip unrelated init, narrow the test scope.)
|
|
77
|
+
- Can I make the **signal sharper**? (Assert on the specific symptom, not "didn't crash".)
|
|
78
|
+
- Can I make it **more deterministic**? (Pin time, seed RNG, isolate filesystem, freeze network.)
|
|
79
|
+
|
|
80
|
+
A 30-second flaky loop is barely better than no loop; a 2-second deterministic one is a debugging superpower.
|
|
81
|
+
|
|
82
|
+
### Non-deterministic bugs
|
|
83
|
+
|
|
84
|
+
The goal is not a clean repro but a **higher reproduction rate**. Loop the trigger 100×, parallelise, add stress, narrow timing windows, inject sleeps. A 50%-flake bug is debuggable; 1% is not — keep raising the rate until it is debuggable.
|
|
85
|
+
|
|
86
|
+
### Completion criterion — a tight loop that goes red
|
|
87
|
+
|
|
88
|
+
Phase 1 is done when the loop is **tight** and **red-capable**: you can name **one command** — a script path, a test invocation, a curl — that you have **already run at least once** (show the invocation and its output, redacted), and that is:
|
|
89
|
+
|
|
90
|
+
- [ ] **Red-capable** — drives the actual bug code path and asserts the **user's exact symptom**, so it can go red on this bug and green once fixed. Not "runs without erroring".
|
|
91
|
+
- [ ] **Deterministic** — same verdict every run (flaky bugs: a pinned, high reproduction rate, per above).
|
|
92
|
+
- [ ] **Fast** — seconds, not minutes.
|
|
93
|
+
- [ ] **Agent-runnable** — unattended; a human in the loop only via the HITL template (§12).
|
|
94
|
+
|
|
95
|
+
No red-capable command, no Phase 2.
|
|
96
|
+
|
|
97
|
+
## 7. Phase 2 — Reproduce + minimise
|
|
98
|
+
|
|
99
|
+
Run the loop. Watch it go red — the bug appears.
|
|
100
|
+
|
|
101
|
+
Confirm:
|
|
102
|
+
|
|
103
|
+
- [ ] The loop produces the failure mode the **user** described — not a different failure that happens to be nearby. Wrong bug = wrong fix.
|
|
104
|
+
- [ ] The failure is reproducible across multiple runs (or, for non-deterministic bugs, reproducible at a high enough rate to debug against).
|
|
105
|
+
- [ ] You have captured the exact symptom (error message, wrong output, slow timing) so later phases can verify the fix actually addresses it.
|
|
106
|
+
|
|
107
|
+
### Minimise
|
|
108
|
+
|
|
109
|
+
Once it is red, shrink the repro to the **smallest scenario that still goes red**. Cut inputs, callers, config, data, and steps **one at a time**, re-running the loop after each cut — keep only what is load-bearing for the failure. A minimal repro shrinks the Phase 3 hypothesis space (fewer moving parts to suspect) and becomes the clean Phase 5 regression. Done when **every remaining element is load-bearing** — removing any one of them makes the loop go green.
|
|
110
|
+
|
|
111
|
+
Do not proceed until you have reproduced **and** minimised.
|
|
112
|
+
|
|
113
|
+
## 8. Phase 3 — Ranked falsifiable hypotheses (show user)
|
|
114
|
+
|
|
115
|
+
Generate **3–5 ranked hypotheses** before testing any of them. Single-hypothesis generation anchors on the first plausible idea.
|
|
116
|
+
|
|
117
|
+
Each hypothesis must be **falsifiable**: state the prediction it makes.
|
|
118
|
+
|
|
119
|
+
> Format: "If `<X>` is the cause, then `<changing Y>` will make the bug disappear / `<changing Z>` will make it worse."
|
|
120
|
+
|
|
121
|
+
If you cannot state the prediction, the hypothesis is a vibe — discard or sharpen it.
|
|
122
|
+
|
|
123
|
+
**Show the ranked list to the user before testing.** They often have domain knowledge that re-ranks instantly ("we just deployed a change to #3"), or know hypotheses they have already ruled out. Cheap checkpoint, big time saver. Don't block on it — proceed with your ranking if the user is AFK.
|
|
124
|
+
|
|
125
|
+
## 9. Phase 4 — One-variable probes / instrumentation
|
|
126
|
+
|
|
127
|
+
Each probe must map to a specific prediction from Phase 3. **Change one variable at a time.**
|
|
128
|
+
|
|
129
|
+
Tool preference:
|
|
130
|
+
|
|
131
|
+
1. **Debugger / REPL inspection** if the environment supports it. One breakpoint beats ten logs.
|
|
132
|
+
2. **Targeted logs** at the boundaries that distinguish hypotheses.
|
|
133
|
+
3. Never "log everything and grep".
|
|
134
|
+
|
|
135
|
+
**Tag every debug log with a unique prefix**, e.g. `[DEBUG-a4f2]` (or any equivalent uniform prefix). Cleanup at the end becomes a **single grep**: `grep -rn "\[DEBUG-" .` / `rg "\[DEBUG-"` — every tagged line dies, untagged lines survive.
|
|
136
|
+
|
|
137
|
+
**Perf branch.** For performance regressions, logs are usually wrong. Instead: establish a baseline measurement (timing harness, `performance.now()`, profiler, query plan), then bisect. Measure first, fix second.
|
|
138
|
+
|
|
139
|
+
## 10. Phase 5 — Regression (freeze the loop)
|
|
140
|
+
|
|
141
|
+
Freeze the loop as a test **or** a repeatable command — whichever has a **correct seam**.
|
|
142
|
+
|
|
143
|
+
A correct seam is one where the test/command exercises the **real bug pattern** as it occurs at the call site. If the only available seam is too shallow (single-caller test when the bug needs multiple callers, unit test that cannot replicate the chain that triggered the bug), a regression there gives false confidence.
|
|
144
|
+
|
|
145
|
+
**If no correct seam exists, that itself is the finding.** Note it — the architecture is preventing the bug from being locked down. Flag it for Phase 6 / break-loop.
|
|
146
|
+
|
|
147
|
+
If a correct seam exists:
|
|
148
|
+
|
|
149
|
+
1. Turn the minimised repro into a failing test (or a repeatable command) at that seam.
|
|
150
|
+
2. Watch it fail.
|
|
151
|
+
3. Apply the fix.
|
|
152
|
+
4. Watch it pass.
|
|
153
|
+
5. Re-run the Phase 1 feedback loop against the original (un-minimised) scenario.
|
|
154
|
+
|
|
155
|
+
This phase hands off to the test-discipline scope (P08) without being absorbed by it: the loop here is bug-driven; test-discipline owns the general testing strategy.
|
|
156
|
+
|
|
157
|
+
## 11. Phase 6 — Cleanup + post-mortem hook
|
|
158
|
+
|
|
159
|
+
Required before declaring done:
|
|
160
|
+
|
|
161
|
+
- [ ] Original repro no longer reproduces (re-run the Phase 1 loop)
|
|
162
|
+
- [ ] Regression passes (or absence of seam is documented)
|
|
163
|
+
- [ ] All `[DEBUG-...]` instrumentation removed — one grep, zero hits
|
|
164
|
+
- [ ] Throwaway prototypes deleted (or moved to a clearly-marked debug location)
|
|
165
|
+
- [ ] The hypothesis that turned out correct is stated in the commit / PR message — so the next debugger learns
|
|
166
|
+
|
|
167
|
+
**Post-mortem hook:** then ask *what would have prevented this bug?* If the answer involves architectural change (no good test seam, tangled callers, hidden coupling), or the bug is worth classifying, run **`cstl-break-loop`** (root cause category A–E, why fixes failed, prevention mechanisms) and/or update the relevant spec/guide via **`cstl-update-spec`**. Make the recommendation **after** the fix is in, not before — you have more information now than when you started.
|
|
168
|
+
|
|
169
|
+
## 12. PowerShell HITL template
|
|
170
|
+
|
|
171
|
+
PowerShell 7 (user environment). Copy this file, edit the steps below, and run it. The agent runs the script; the user follows prompts in their terminal. Two helpers:
|
|
172
|
+
|
|
173
|
+
- `Step "instruction"` → show instruction, wait for Enter
|
|
174
|
+
- `$var = Capture "question"` → show question, read response; the returned value is echoed back, where the agent reads it — so capture observations, and leave signing in to the user as a `Step`
|
|
175
|
+
|
|
176
|
+
At the end, captured values are printed as `KEY=VALUE` for the agent to parse.
|
|
177
|
+
|
|
178
|
+
```powershell
|
|
179
|
+
# Human-in-the-loop reproduction loop (PowerShell 7).
|
|
180
|
+
# Usage: ./hitl-loop.ps1
|
|
181
|
+
# Edit the "--- edit below ---" section per bug, then run it.
|
|
182
|
+
|
|
183
|
+
$ErrorActionPreference = 'Stop'
|
|
184
|
+
|
|
185
|
+
function Step {
|
|
186
|
+
param([Parameter(Mandatory)][string]$Instruction)
|
|
187
|
+
Write-Host ''
|
|
188
|
+
Write-Host ">>> $Instruction" -ForegroundColor Cyan
|
|
189
|
+
[void](Read-Host " [Enter when done] ")
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function Capture {
|
|
193
|
+
param([Parameter(Mandatory)][string]$Question)
|
|
194
|
+
Write-Host ''
|
|
195
|
+
Write-Host ">>> $Question" -ForegroundColor Cyan
|
|
196
|
+
$answer = Read-Host " > "
|
|
197
|
+
Write-Host " (captured: $answer)"
|
|
198
|
+
return $answer
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
# --- edit below ---------------------------------------------------------
|
|
202
|
+
|
|
203
|
+
Step "Open the app at http://localhost:3000 and sign in."
|
|
204
|
+
|
|
205
|
+
$ERRORED = Capture "Click the 'Export' button. Did it throw an error? (y/n)"
|
|
206
|
+
|
|
207
|
+
$ERROR_MSG = Capture "Paste the error message (or 'none'):"
|
|
208
|
+
|
|
209
|
+
# --- edit above ---------------------------------------------------------
|
|
210
|
+
|
|
211
|
+
Write-Host ''
|
|
212
|
+
Write-Host '--- Captured ---' -ForegroundColor Green
|
|
213
|
+
Write-Host "ERRORED=$ERRORED"
|
|
214
|
+
Write-Host "ERROR_MSG=$ERROR_MSG"
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Adaptation notes for the agent: keep the loop **agent-runnable** where possible (headless/HTTP/CLI first); HITL only when a human must click or sign in. Never ask the user to paste secrets into the loop output — capture observations, leave signing in to the user as a `Step`.
|
|
218
|
+
|
|
219
|
+
## 13. Completion checklist
|
|
220
|
+
|
|
221
|
+
- [ ] Phase 1 loop exists, ran at least once, red-capable, deterministic, fast, agent-runnable (or escape hatch justified in one sentence)
|
|
222
|
+
- [ ] Phase 2: reproduced the user's exact symptom; repro minimised until every element is load-bearing
|
|
223
|
+
- [ ] Phase 3: 3–5 ranked falsifiable hypotheses, each with a stated prediction; shown to user
|
|
224
|
+
- [ ] Phase 4: one variable per probe; debug logs tagged `[DEBUG-...]`
|
|
225
|
+
- [ ] Phase 5: loop frozen as test or repeatable command at a correct seam (or absence of seam documented)
|
|
226
|
+
- [ ] Phase 6: original repro green, instrumentation removed (one grep, zero hits), post-mortem hook to `cstl-break-loop` / `cstl-update-spec` decided
|
|
227
|
+
- [ ] Everything shown to the user redacted (`<REDACTED>`, credentials via env)
|
|
@@ -0,0 +1,132 @@
|
|
|
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
|