@blxzer/cursor-trellis 0.3.6 → 0.4.1
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 +39 -1
- package/README.md +10 -6
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +11 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +2 -1
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts +7 -0
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +61 -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/migrations/manifests/0.4.1.json +9 -0
- package/dist/templates/common/{skills/check.md → bundled-skills/cstl-check/SKILL.md} +55 -7
- package/dist/templates/common/bundled-skills/cstl-check/references/fowler-12-smells.md +28 -0
- package/dist/templates/common/bundled-skills/cstl-handoff/SKILL.md +117 -0
- package/dist/templates/common/bundled-skills/cstl-micro-grill/SKILL.md +6 -0
- package/dist/templates/common/skills/brainstorm.md +15 -0
- package/dist/templates/cursor/agents/cstl-check.md +14 -0
- package/dist/templates/cursor/commands/handoff.md +99 -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/CONTEXT.md +53 -0
- package/dist/templates/trellis/docs/adr/README.md +21 -0
- package/dist/templates/trellis/index.d.ts +14 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +29 -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/artifact_locale.py +16 -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/tasks/locale/en/default-prd.md +8 -0
- package/dist/templates/trellis/tasks/locale/zh/default-prd.md +8 -0
- package/dist/templates/trellis/workflow.md +34 -2
- package/dist/utils/manifest-prune.d.ts.map +1 -1
- package/dist/utils/manifest-prune.js +7 -0
- package/dist/utils/manifest-prune.js.map +1 -1
- package/package.json +2 -2
|
@@ -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
|
|
@@ -23,6 +23,9 @@ These guides help you **ask the right questions before coding**.
|
|
|
23
23
|
|-------|---------|-------------|
|
|
24
24
|
| [Durable Learning Decision Guide](./durable-learning-decision-guide.md) | Choose no-learning vs spec update vs learning artifact before archive | Finishing a task, parent review, or after `/cstl:break-loop` |
|
|
25
25
|
| [Verification Strength Guide](./verification-strength-guide.md) | Graded verify depth (Lite/Full/Parent × verification_profile); false-green probes; **not** TDD | Phase 3.1, writing `verify.md`, choosing check depth, archive prep |
|
|
26
|
+
| [Debug Loop Guide](./debug-loop-guide.md) | Debug discipline: tight red-capable feedback loop before hypotheses; six phases; `[DEBUG-xxx]` tags; Redact; PS7 HITL | User reports a hard bug / performance regression; diagnosis in progress (before `cstl-break-loop`) |
|
|
27
|
+
| [Test Discipline Guide](./test-discipline-guide.md) | 测试写作纪律:pre-agreed seams、垂直切片、三反模式、mock 边界;**不是 TDD 要求** | Writing or reviewing tests; planning what to test; choosing mock boundaries |
|
|
28
|
+
| [Prototype Guide](./prototype-guide.md) | 原型纪律:一次性代码回答设计问题;问题决定形态;LOGIC/Python 默认、UI 不适用;折叠重写不 mv、留证 + 清理 | A design question needs a runnable throwaway answer (mechanism / state model / algorithm); folding a verdict into design or real code |
|
|
26
29
|
| [Injection Budget Guide](./injection-budget-guide.md) | Per-channel caps, jsonl manifest limits, Layer 2 defaults; matrix-aligned | Adding alwaysApply rules, curating jsonl, subagent dispatch |
|
|
27
30
|
| [Code Reuse Thinking Guide](./code-reuse-thinking-guide.md) | Identify patterns and reduce duplication | When you notice repeated patterns |
|
|
28
31
|
| [Cross-Layer Thinking Guide](./cross-layer-thinking-guide.md) | Think through data flow across layers | Features spanning multiple layers |
|
|
@@ -32,7 +35,15 @@ These guides help you **ask the right questions before coding**.
|
|
|
32
35
|
| [Execution strategy](./execution-strategy.md) | `suggest-execution-strategy`, rules JSON, inline vs worker vs child-task | Writing `implement.md` contract, Phase 2 dispatch |
|
|
33
36
|
| [Cursor context injection guide](./cursor-context-injection-guide.md) | Which Cursor channels reach the model (sessionStart bug, .cursor/rules, AGENTS.md) | "Agent ignored instructions" on Cursor, adding always-visible rules |
|
|
34
37
|
| [Cursor native modes guide](./cursor-native-modes-guide.md) | Prefer Plan / Ask / Debug / Agent / Multitask × Trellis phases & artifacts | P1 mode routing, Parent/Multitask, Ask↔No Task, Plan↔Phase 1, Debug evidence |
|
|
38
|
+
| [Artifact locale guide](./artifact-locale-guide.md) | Human-reviewed PRD/design/implement/verify/handoff language (zh \| en) | `task.py create`, planning skills, session context; not full CLI i18n |
|
|
35
39
|
| [cursor-trellis release & coexistence](./cursor-trellis-release-coexistence-guide.md) | npm publish runbook, `cstl-v*` tags, upstream Trellis coexistence | Releasing cstl, scenario 2 init, migrate gate, uninstall AGENTS strip |
|
|
40
|
+
| [Goal release regression runbook](./goal-release-regression-runbook.md) | Goal npm 发布前回归闸:mock/live 命令、契约路径、SDK timeout 残余风险 | Root npm 闸、Parent integrate 前 Goal 自检、hardening 后发布 |
|
|
41
|
+
|
|
42
|
+
### When using `/cstl-goal` (optional long-horizon mode)
|
|
43
|
+
|
|
44
|
+
- [ ] User explicitly invoked `/cstl-goal` — default cstl spine unchanged otherwise
|
|
45
|
+
- [ ] Read [cstl-goal Contract](../Trellis/framework/cstl-goal-contract.md) §1 preflight + §3 hard deny before G1 self-drive
|
|
46
|
+
- [ ] High-risk actions: pack per [Action Packet](../Trellis/framework/cstl-goal-action-packet.md) → reviewer seam; no bare execute
|
|
36
47
|
|
|
37
48
|
---
|
|
38
49
|
|
|
@@ -75,6 +86,32 @@ These guides help you **ask the right questions before coding**.
|
|
|
75
86
|
|
|
76
87
|
**Verification rule**: Every CRITICAL/WARNING finding must be verified against the actual code before prioritizing. Budget ~35% false-positive rate for AI reviews.
|
|
77
88
|
|
|
89
|
+
### When Debugging Hard Bugs or Performance Regressions
|
|
90
|
+
|
|
91
|
+
- [ ] User reports something broken / throwing / failing / slow, and it is not obvious at a glance
|
|
92
|
+
- [ ] You find yourself about to read code to form a theory before you have a runnable repro command
|
|
93
|
+
- [ ] A fix attempt failed and you have no regression to prove the fix
|
|
94
|
+
- [ ] You need a human-in-the-loop repro script (PowerShell 7)
|
|
95
|
+
|
|
96
|
+
→ Read [Debug Loop Guide](./debug-loop-guide.md) (diagnosis in progress; run `cstl-break-loop` after the fix)
|
|
97
|
+
|
|
98
|
+
### When Writing or Reviewing Tests
|
|
99
|
+
|
|
100
|
+
- [ ] You're about to write tests for new or existing behavior
|
|
101
|
+
- [ ] You're reviewing a test that breaks on refactor without a behavior change
|
|
102
|
+
- [ ] You need to decide what to mock and where the seam is
|
|
103
|
+
- [ ] Test expectations seem to restate the implementation
|
|
104
|
+
|
|
105
|
+
→ Read [Test Discipline Guide](./test-discipline-guide.md)
|
|
106
|
+
|
|
107
|
+
### When a Design Question Needs a Runnable Throwaway
|
|
108
|
+
|
|
109
|
+
- [ ] 你在验证一个机制 / 状态模型 / 算法「感不感觉对」——不是 bug 调试,是设计验证
|
|
110
|
+
- [ ] 结论要写回 design / prd / 真实代码,但想先跑起来看证据
|
|
111
|
+
- [ ] 准备写一次性脚本回答「如果……会怎样」
|
|
112
|
+
|
|
113
|
+
→ Read [Prototype Guide](./prototype-guide.md) (LOGIC/Python default; UI N/A; fold+evidence+cleanup)
|
|
114
|
+
|
|
78
115
|
---
|
|
79
116
|
|
|
80
117
|
## Pre-Modification Rule (CRITICAL)
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Prototype Guide(原型纪律)
|
|
2
|
+
|
|
3
|
+
> **Purpose**: 用一次性代码回答**设计问题**——先写清问题,再由问题决定原型形态;答案折叠进真实代码(**重写不 mv**),原型留证后清理,不留工作区腐烂。本 harness:**LOGIC / Python 默认,UI 不适用(N/A)**。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Purpose / When to use
|
|
8
|
+
|
|
9
|
+
**原型是一次性代码,回答一个设计问题。** 什么时候用:
|
|
10
|
+
|
|
11
|
+
- 要验证某个**机制 / 状态模型 / 算法**「感不感觉对」——在纸上难推演的 case,跑起来看证据。
|
|
12
|
+
- 要在 design / prd 落结论前,先对「如果……会怎样」拿到可观察的事实。
|
|
13
|
+
- 结论已知会写回真实代码,但想让实现者先摸一遍形状。
|
|
14
|
+
|
|
15
|
+
原型唯一的产出是**答案**,不是代码。
|
|
16
|
+
|
|
17
|
+
## 2. Non-goals
|
|
18
|
+
|
|
19
|
+
- **不接真实 DB / 服务**:原型依赖一律假数据 / 内存 / 显式标记的临时本地文件。
|
|
20
|
+
- **不直接升生产**:原型的代码路径不是生产代码的捷径;折叠时**重写**,不 `mv`。
|
|
21
|
+
- **不做 UI(本 harness)**:本 harness 无 UI 面,UI 原型不适用(见 §6)。
|
|
22
|
+
- **不替代测试 / 调试 / 需求发现**:见 §12 边界(单向链)。
|
|
23
|
+
|
|
24
|
+
## 3. Hard rules
|
|
25
|
+
|
|
26
|
+
1. **问题决定形态** — 先写设计问题,再选原型形态;问题写不清,先不写代码。
|
|
27
|
+
2. **丢弃式(throwaway)** — 从第一天起就是一次性:不接真实 DB/服务;**不加测试、不泛化**(可跑即可);默认**无持久化**(或仅临时本地文件且须清理)。
|
|
28
|
+
3. **状态可见** — 每次 action 后打印/记录关键状态(print / 日志 / 简单 TUI),答案从可见状态里读出来。
|
|
29
|
+
4. **答案折叠** — 结论写回 design / prd / 真实代码;原型代码本身**不提升**为生产代码,折叠时在真实 module 里**重写**,不 `mv`。
|
|
30
|
+
5. **留证后可清理** — 答案折叠 + 留证完成后,删除工作区里的原型(§9 / §10),不留腐烂。
|
|
31
|
+
|
|
32
|
+
## 4. Step 0 — Write the design question
|
|
33
|
+
|
|
34
|
+
开始前写一句话,并放进原型文件头:
|
|
35
|
+
|
|
36
|
+
> 这个原型要回答:____________
|
|
37
|
+
|
|
38
|
+
回答不了这个问题,就说明原型还没开始对。
|
|
39
|
+
|
|
40
|
+
## 5. Shape: LOGIC(Python)— default for this harness
|
|
41
|
+
|
|
42
|
+
本 harness 的 LOGIC 默认形态(替代 Matt 单 HTML 默认;本仓库无 UI 面):
|
|
43
|
+
|
|
44
|
+
- **单个可运行脚本**,路径二选一:
|
|
45
|
+
- `.tmp/prototypes/<slug>/run.py`(工作区 scratch;**惰性创建,不预建空目录**)
|
|
46
|
+
- 任务 `research/prototype-<slug>.py`(工作位置即留证位置,见 §9)
|
|
47
|
+
- **逻辑与 demo 入口分离**:文件内分两段——
|
|
48
|
+
- `# --- logic (portable) ---`:纯逻辑函数(无副作用、依赖从参数注入),折叠时可提起进真实代码
|
|
49
|
+
- `# --- demo entry ---`:构造输入、调用、打印状态,只服务于「跑起来看答案」
|
|
50
|
+
- **运行**:`python run.py` 即得可观察输出,无额外步骤。
|
|
51
|
+
- 最小骨架示例见 §13。
|
|
52
|
+
|
|
53
|
+
## 6. Shape: UI — N/A for this harness
|
|
54
|
+
|
|
55
|
+
**不适用 / N/A。** 本 harness 没有 UI 面(agent CLI + 文档工作流),**不写 UI 脚手架**、不做 UI 变体原型、不引入 UI 分支。若上游项目需要 UI 原型,那是上游项目自己的事,不进本 harness 主树。
|
|
56
|
+
|
|
57
|
+
## 7. Visibility of state
|
|
58
|
+
|
|
59
|
+
原型回答问题的机制必须**可观察**:
|
|
60
|
+
|
|
61
|
+
- 每次 action 后打印完整相关状态,不省略中间态。
|
|
62
|
+
- 关键分支打印路径标签;比较类问题打印两侧差异。
|
|
63
|
+
- 输出讲不清 → 答案就落不进 design。
|
|
64
|
+
|
|
65
|
+
## 8. Capture the answer → fold into real code
|
|
66
|
+
|
|
67
|
+
原型结束后两件事:
|
|
68
|
+
|
|
69
|
+
1. **折叠答案**:把结论(问题 + 判定 + 理由)写回 design / prd / 真实代码;代码折叠时在真实 module 里**重写** logic 段(贴合真实接口与错误处理),**不 `mv` 原型文件升生产**。
|
|
70
|
+
2. **留证原型**(primary source,可回看「当时怎么答的」)——见 §9。
|
|
71
|
+
|
|
72
|
+
## 9. Evidence(留证:throwaway 分支 / 路径快照)
|
|
73
|
+
|
|
74
|
+
两层留证机制,**清理前必须确认留证已落**:
|
|
75
|
+
|
|
76
|
+
| 层 | 手段 | 适用 |
|
|
77
|
+
| --- | --- | --- |
|
|
78
|
+
| A | git **throwaway 分支**提交(如 `proto/<slug>`,离开 main),留上下文指针 | git 仓库(如 cursor-trellis / smart-search) |
|
|
79
|
+
| B | **路径快照**:复制到 `.cstl/tasks/<task>/research/prototype-<slug>.py`(或任务目录等价位置),并在 handoff.md / verify.md 记录路径 | **非 git 仓库——本 harness 根目录的默认手段** |
|
|
80
|
+
|
|
81
|
+
- 工作位置本身是任务 `research/prototype-<slug>.py` 时,即工作即留证,无需再复制。
|
|
82
|
+
- A / B 可并用。
|
|
83
|
+
|
|
84
|
+
## 10. Cleanup / archive(清理:不留腐烂)
|
|
85
|
+
|
|
86
|
+
- **何时**:答案已折叠 + 留证已落,原型不再需要。
|
|
87
|
+
- **做什么**:删除 `.tmp/prototypes/<slug>/`——scratch 工作区不留腐烂;若原型躺在任务 `research/` 下,那本身就是留证,保留并按任务归档机制处理。
|
|
88
|
+
- **不做**:把原型当长期分支 / 常驻目录养;在 main 上留下 throwaway 痕迹。
|
|
89
|
+
|
|
90
|
+
## 11. Anti-patterns(反模式清单)
|
|
91
|
+
|
|
92
|
+
| 反模式 | 信号 | 修正 |
|
|
93
|
+
| --- | --- | --- |
|
|
94
|
+
| 过早泛化 | 加参数 / 抽象 / 配置,问题还没回答完 | 回到最小:只够回答问题 |
|
|
95
|
+
| 接生产依赖 | 连真实 DB / 服务 / 凭据 | 假数据 / 内存 / 显式临时文件 |
|
|
96
|
+
| 当长期分支养 | 原型分支 / 目录持续叠加功能、迟迟不折叠 | 答案到手即折叠 + 清理 |
|
|
97
|
+
| 在本项目启用 UI 分支 | 写 UI 脚手架 / UI 变体原型 | 本 harness UI N/A,直接不做 |
|
|
98
|
+
| `mv` 升生产 | 原型文件直接改名 / 移入真实路径 | 折叠时重写进真实 module |
|
|
99
|
+
| 答案不留证 | 跑完即删、结论没落任何地方 | §8 折叠 + §9 留证先行 |
|
|
100
|
+
|
|
101
|
+
## 12. Relation to debug-loop / test-discipline / brainstorm(边界,单向链)
|
|
102
|
+
|
|
103
|
+
- **Debug Loop Guide**:debug-loop 用 throwaway harness 回答「**为什么坏了**」(bug / 性能回归,诊断进行中);原型回答「**这个设计 / 机制对不对**」(尚无 bug,设计前)。原型**不替代**调试纪律。
|
|
104
|
+
- **Test Discipline Guide**:test-discipline 管生产测试写作(pre-agreed seams、反模式、mock 边界);原型**不加测试**(可跑即可)。原型**不替代**测试纪律。
|
|
105
|
+
- **brainstorm**:brainstorm 管需求发现(用户想要什么);原型管设计验证(机制怎么实现才对)。原型**不替代** brainstorm。
|
|
106
|
+
- 衔接点:原型的可运行骨架可能成为 debug-loop 反馈环的起点或真实测试的输入样例——那是**下游复用**,不是原型的职责。
|
|
107
|
+
|
|
108
|
+
## 13. Minimal skeleton(LOGIC, Python)
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
# prototype: <slug> — throwaway,回答:「________________」 (§4 设计问题)
|
|
112
|
+
# 运行: python run.py;不接真实依赖;答案折叠后清理或留证(§9/§10)
|
|
113
|
+
|
|
114
|
+
# --- logic (portable) ---
|
|
115
|
+
def next_state(current: str, event: str) -> str:
|
|
116
|
+
transitions = {
|
|
117
|
+
("idle", "start"): "running",
|
|
118
|
+
("running", "stop"): "stopped",
|
|
119
|
+
}
|
|
120
|
+
return transitions.get((current, event), current)
|
|
121
|
+
|
|
122
|
+
# --- demo entry ---
|
|
123
|
+
if __name__ == "__main__":
|
|
124
|
+
state = "idle"
|
|
125
|
+
for event in ["start", "pause", "stop"]:
|
|
126
|
+
state = next_state(state, event)
|
|
127
|
+
print(f"{event:>8} -> {state}") # 状态可见:每次 action 后打印
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## 14. Checklist
|
|
131
|
+
|
|
132
|
+
- [ ] §4 设计问题已写清(一句话,在文件头)
|
|
133
|
+
- [ ] 形态:LOGIC / Python 单脚本;UI 不适用(未写 UI 脚手架)
|
|
134
|
+
- [ ] 不接真实 DB / 服务;无持久化(或显式临时文件且会清理)
|
|
135
|
+
- [ ] 无测试、无泛化——可跑即可
|
|
136
|
+
- [ ] 状态可见:关键状态每次 action 后打印
|
|
137
|
+
- [ ] 答案已折叠(写回 design / prd / 真实代码;**重写不 mv**)
|
|
138
|
+
- [ ] 留证已落(git throwaway 分支,或非 git 路径快照到任务 `research/`)
|
|
139
|
+
- [ ] 清理完成:`.tmp/prototypes/<slug>/` 已删,无工作区腐烂
|
|
@@ -20,6 +20,10 @@ Ask: *If this answer were wrong because the world or a third-party API moved, wo
|
|
|
20
20
|
**NO examples:** symbol location / call chains; in-repo Trellis contracts; behavior of the code you are editing; pure rename/lint inside known files.
|
|
21
21
|
After search: persist under `{TASK}/research/` with a **provider label**; treat hits as candidates until corroborated (repo, test, or second source).
|
|
22
22
|
|
|
23
|
+
## Primary source preference
|
|
24
|
+
|
|
25
|
+
Prefer **primary sources** — official docs, source code, first-party API references, release notes, standards text. Mark blog posts, aggregators, and unverified second-hand summaries as **secondary** until corroborated against a primary source or the repo. This layers on top of "hits as candidates until corroborated": it ranks *which* candidates to trust first, and does not change the smart-search mandatory-first rule above.
|
|
26
|
+
|
|
23
27
|
## Prefer / Adapt / Own (code intelligence)
|
|
24
28
|
|
|
25
29
|
| Need | **Prefer** (Cursor native) | **Adapt** | **Own** (codegraph / MCP) |
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Test Discipline Guide(测试纪律)
|
|
2
|
+
|
|
3
|
+
> **Purpose**: 测试写作纪律 —— pre-agreed seams、垂直切片、三反模式、mock 边界,让写出来的测试值得保留。**纪律不是 TDD 要求**;写测试、读测试、评审测试时都适用,与是否测试先行无关。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Purpose — discipline, not TDD
|
|
8
|
+
|
|
9
|
+
本 guide 定义「测试写作纪律」:当测试存在时(新写、补写、评审、bug 回归落地),它们应当落在哪、验证什么、不做什么。纪律约束的是测试**质量**,不是测试**时序**:
|
|
10
|
+
|
|
11
|
+
- **不要求 red-before-green**。可以先写测试(test-first 是可选的节奏),也可以实现后补测试——纪律在两种时序下同样适用。
|
|
12
|
+
- **不强制 TDD 循环**。本 guide 不定义 red → green → refactor 流程;不设「每个函数必须单测」门槛。
|
|
13
|
+
- 与 [Verification Strength Guide](./verification-strength-guide.md) 兼容:验证**强度**(任务 closeout 要验多深)≠ red-green 仪式;本 guide 管的是「测试怎么写才值得保留」。
|
|
14
|
+
|
|
15
|
+
> 一句话:**先确认测点(seam),再写测试;测试验公共行为,不验实现。**
|
|
16
|
+
|
|
17
|
+
## 2. Non-goals
|
|
18
|
+
|
|
19
|
+
- **不是 TDD 手册**:不要求测试先行,不要求红-绿循环,不把 red-before-green 写成强制流程。
|
|
20
|
+
- **不选型**:不规定 pytest 以外的框架,不做 mock 库选型。
|
|
21
|
+
- **不替代 Verification Strength Guide**:验证强度(closeout 深度 / false-green 探针)由该 guide 管,本 guide 只管测试写作本身。
|
|
22
|
+
- **不替代 Debug Loop Guide Phase 5**:bug 驱动的回归落地由 debug-loop 管,本 guide 只定义何为 good seam(见 §9)。
|
|
23
|
+
|
|
24
|
+
## 3. What a good test is
|
|
25
|
+
|
|
26
|
+
好测试的判据,对每次测试写作生效:
|
|
27
|
+
|
|
28
|
+
- **通过公共 interface 验行为,不验实现细节**。module 可以完全重写,测试不该跟着改;测试关心调用者能获得什么行为,不关心内部怎么拼。
|
|
29
|
+
- **读起来像规格**。测试名描述能力(「用户可以用有效购物车结账」),读者从测试就能看出 module 支持什么。
|
|
30
|
+
- **耐重构**。重构后行为不变,测试仍绿;只有行为真正变化时才变红。
|
|
31
|
+
- **期望值来自独立事实源**。已知字面量、手算样例、规格值——不是用实现同款方式重算(见 §6 tautological)。
|
|
32
|
+
|
|
33
|
+
## 4. Seams(pre-agreed)
|
|
34
|
+
|
|
35
|
+
**seam**(词汇与 CONTEXT.md architecture 段一致):*不改动原处即可改变行为的位置*。测试在 seam 处通过 interface 观察行为,绝不伸手进内部。
|
|
36
|
+
|
|
37
|
+
**只在 pre-agreed seam 写测试。** 写任何测试之前:
|
|
38
|
+
|
|
39
|
+
1. **列出待测 seam 清单**:要测哪些 module 的哪个 interface、每条验什么行为。
|
|
40
|
+
2. **与用户确认**。未确认的 seam 不写测试。
|
|
41
|
+
3. 确认时按此排序:**优先既有 seam**(已有接口 / 既有测试点,不为测试新建结构);**尽量高位 seam**(越接近用户行为越好——一条高位测试覆盖多个低位实现);**少而精**(宁可一条高位测试,不要十条内部断言)。
|
|
42
|
+
|
|
43
|
+
你不可能测完一切——预先同意 seam,是把测试力气花在关键路径和复杂逻辑上,而不是每个边角。
|
|
44
|
+
|
|
45
|
+
> 问句:「公共 interface 是什么?我们要测哪些 seam?」——接口形状本身有疑问时(module 多深、seam 该在哪),先做设计,再定测点。
|
|
46
|
+
|
|
47
|
+
## 5. Vertical slices(tracer bullets)
|
|
48
|
+
|
|
49
|
+
**一测 → 一段最小实现 → 重复**:
|
|
50
|
+
|
|
51
|
+
1. 一个 seam、一条测试(tracer bullet)。
|
|
52
|
+
2. 只写让这条测试通过的最小实现。
|
|
53
|
+
3. 重复,让每条新测试回应上一条循环学到的形状。
|
|
54
|
+
|
|
55
|
+
**禁止 horizontal bulk**——先写完全部测试再实现。横向批量的危害:测试验证的是**想象的行为**(测的是形状而不是用户行为)、对真实变化不敏感、实现还没理解就锁死了测试结构。
|
|
56
|
+
|
|
57
|
+
垂直切片在测试**写作**上同样成立:不要在动手前批量铺测试,一条一条来。
|
|
58
|
+
|
|
59
|
+
## 6. Anti-patterns(三反模式)
|
|
60
|
+
|
|
61
|
+
### Implementation-coupled(实现耦合)
|
|
62
|
+
|
|
63
|
+
mock 内部协作对象、测私有方法、或旁路验证(绕过 interface 直接查库 / 读内部状态)。
|
|
64
|
+
|
|
65
|
+
- 识别信号:重构后测试变红但行为没变;测试名描述 HOW 不描述 WHAT;断言调用次数 / 调用顺序。
|
|
66
|
+
- 反例:`create_user` 后直接查库验入库——应通过 interface 验「创建后能取回」。
|
|
67
|
+
- 修正:回到 §3——只通过公共 interface 观察行为。
|
|
68
|
+
|
|
69
|
+
### Tautological(同义反复)
|
|
70
|
+
|
|
71
|
+
期望值用与实现相同的方式重算,passes by construction——测试永远不可能与代码不一致,因为它复述了代码。
|
|
72
|
+
|
|
73
|
+
- 识别信号:期望值是 reduce / 拼接 / 同式重算;快照由实现同款手工推出;常量断言等于它自己。
|
|
74
|
+
- 反例:`expect(total([10, 5])).toBe(items.reduce(...))`——期望值就是实现。
|
|
75
|
+
- 修正:期望值必须来自独立事实源——已知字面量(`expect(total([10, 5])).toBe(15)`)、手算样例、规格值。
|
|
76
|
+
|
|
77
|
+
### Horizontal slicing(横向切片)
|
|
78
|
+
|
|
79
|
+
先写全部测试再实现;按层横切而不是按用户行为竖切。
|
|
80
|
+
|
|
81
|
+
- 识别信号:测试一次性铺满所有层级(API 层全部 → 服务层全部 → …);测试对象是「形状」而非行为;实现未动时测试结构已锁定。
|
|
82
|
+
- 修正:回到 §5 垂直切片。
|
|
83
|
+
|
|
84
|
+
## 7. Mock boundaries
|
|
85
|
+
|
|
86
|
+
**只在系统边界 mock**:
|
|
87
|
+
|
|
88
|
+
- 外部 API(支付、邮件等)
|
|
89
|
+
- DB(**优先用测试库**,mock DB 是退路)
|
|
90
|
+
- 时间 / 随机性
|
|
91
|
+
- 文件系统(视情况)
|
|
92
|
+
|
|
93
|
+
**不 mock**:
|
|
94
|
+
|
|
95
|
+
- 自己的 module / 内部协作对象
|
|
96
|
+
- 任何我们控制的东西
|
|
97
|
+
|
|
98
|
+
为可 mock 性设计接口:
|
|
99
|
+
|
|
100
|
+
- **DI 优于内部 `new`**:外部依赖从参数传入,而不是在实现里创建:
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
# 易 mock:依赖注入
|
|
104
|
+
def process_payment(order, payment_client):
|
|
105
|
+
return payment_client.charge(order.total)
|
|
106
|
+
|
|
107
|
+
# 难 mock:实现内部创建
|
|
108
|
+
def process_payment(order):
|
|
109
|
+
client = PaymentClient(os.environ["PAYMENT_KEY"])
|
|
110
|
+
return client.charge(order.total)
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
- **SDK 式接口优于通用 fetcher**:每个外部操作用独立函数(`get_user(id)` / `create_order(data)`),而不是一个带条件分支的通用 `fetch(endpoint, opts)`。每个 mock 返回一种确定形状,测试设置里没有条件逻辑,也容易看出测试走了哪个端点。
|
|
114
|
+
|
|
115
|
+
## 8. Relation to verification-strength-guide
|
|
116
|
+
|
|
117
|
+
- Verification Strength Guide 管验证**强度**:任务 closeout 要验多深、false-green 探针,且明确 **not TDD**(§1 Non-goals:不产品化 red-green 仪式、无 per-function 单测门槛)。
|
|
118
|
+
- 本 guide 管测试**写作质量**:测试存在时,落在 pre-agreed seam、验公共行为、避开三反模式。
|
|
119
|
+
- 二者正交、兼容:按验证强度选验证深度;按本 guide 写测试。**验证强度 ≠ red-green 仪式。**
|
|
120
|
+
|
|
121
|
+
## 9. Relation to debug-loop Phase 5(衔接不吞并)
|
|
122
|
+
|
|
123
|
+
[Debug Loop Guide](./debug-loop-guide.md) Phase 5 的回归是 **bug 驱动**:把最小复现冻结成测试或可重复命令,且必须落在 **correct seam**(在真实调用点复现真实 bug 模式)。
|
|
124
|
+
|
|
125
|
+
- **bug 回归走 debug-loop**:Phase 5 决定「把这个 bug 锁在哪个 seam」,本 guide 不接管闭环流程。
|
|
126
|
+
- **通用测试写作走本 guide**:新功能、补测、评审由本 guide 管(pre-agreed seam、反模式、mock 边界)。
|
|
127
|
+
- 衔接点:Phase 5 判定 correct seam 时,引用的正是本 guide 的 good seam 概念与反模式——**衔接不吞并**:bug 驱动回归 ≠ 通用测试写作,两者各有入口,互不替代。
|
|
128
|
+
|
|
129
|
+
## 10. Checklist before writing tests
|
|
130
|
+
|
|
131
|
+
写测试前确认:
|
|
132
|
+
|
|
133
|
+
- [ ] seam 清单已列出并与用户确认(**未确认的 seam 不写测试**)
|
|
134
|
+
- [ ] 优先既有 seam / 高位 seam / 少而精
|
|
135
|
+
- [ ] 测试通过公共 interface 验行为(不是私有方法、不是内部协作对象)
|
|
136
|
+
- [ ] 期望值来自独立事实源(已知字面量 / 样例 / 规格),不是实现同款重算
|
|
137
|
+
- [ ] mock 只在系统边界;自己的 module 不 mock;依赖经 DI 注入
|
|
138
|
+
- [ ] 一次一条垂直切片(一测 → 最小实现 → 重复),不做横向批量
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
- **No TDD productization** — cstl does not require red-green-refactor loops, "write tests first" gates, or per-function unit test mandates.
|
|
10
10
|
- **No per-task full-suite burden** — Lite tasks must not be forced through architecture review or whole-repo CI.
|
|
11
11
|
- **No replacement for project test frameworks** — cstl validation checks **task evidence** in `verify.md` and configured quality gates; it does not run or replace your project's test runner.
|
|
12
|
+
- **No test-writing mandate** — how to write good tests (pre-agreed seams, anti-patterns, mock boundaries) lives in the [Test Discipline Guide](./test-discipline-guide.md); verification strength is orthogonal to test-writing style.
|
|
12
13
|
|
|
13
14
|
---
|
|
14
15
|
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# CONTEXT
|
|
2
|
+
|
|
3
|
+
Project domain glossary — the single source of truth for project-specific terms used in this repository. Read **on demand** when project terms matter (e.g. before planning questions, PRD writing, or check reviews); **never always-inject** — this file stays out of the automatic session prompt budget.
|
|
4
|
+
|
|
5
|
+
Only project-specific concepts belong here; generic programming concepts and framework terms already documented under `.cstl/` do not need entries. Each entry: term + one-line definition + `_Avoid_` aliases when a common synonym causes confusion. Language follows `artifact_locale` (en → English only; zh → Chinese terms with English gloss).
|
|
6
|
+
|
|
7
|
+
## Framework domain seed (optional)
|
|
8
|
+
|
|
9
|
+
Optional starting set — delete entries that do not apply to this project:
|
|
10
|
+
|
|
11
|
+
**Task** (_task_):
|
|
12
|
+
CSTL task, directory under `.cstl/tasks/`, lifecycle planning / in_progress / completed.
|
|
13
|
+
_Avoid_: ticket, issue
|
|
14
|
+
|
|
15
|
+
**PRD** (_product requirements document_):
|
|
16
|
+
Task requirements artifact: Goal / User Stories / Requirements / Acceptance Criteria / Implementation Decisions.
|
|
17
|
+
_Avoid_: spec sheet
|
|
18
|
+
|
|
19
|
+
**Gate** (_gate_):
|
|
20
|
+
Mandatory checkpoint at planning / execution / archive boundaries.
|
|
21
|
+
_Avoid_: —
|
|
22
|
+
|
|
23
|
+
**Evidence** (_evidence_):
|
|
24
|
+
Verification evidence in `verify.md` (command output, paths, acceptance).
|
|
25
|
+
_Avoid_: report
|
|
26
|
+
|
|
27
|
+
**Contract** (_contract_):
|
|
28
|
+
Execution contract in `implement.md` (execution_mode / verification_profile / quality_gates).
|
|
29
|
+
_Avoid_: plan
|
|
30
|
+
|
|
31
|
+
**Child** (_child_):
|
|
32
|
+
Independently verifiable deliverable under a Parent task tree.
|
|
33
|
+
_Avoid_: sub-ticket
|
|
34
|
+
|
|
35
|
+
**artifact_locale** (_artifact locale_):
|
|
36
|
+
Project artifact language setting (en / zh).
|
|
37
|
+
_Avoid_: locale
|
|
38
|
+
|
|
39
|
+
**Task Ladder** (_task ladder_):
|
|
40
|
+
Triage ladder: No Task / Micro-Grill / Lite / Full / Parent.
|
|
41
|
+
_Avoid_: —
|
|
42
|
+
|
|
43
|
+
## Project glossary
|
|
44
|
+
|
|
45
|
+
Add project-specific terms below (term + one-line definition + `_Avoid_` aliases):
|
|
46
|
+
|
|
47
|
+
| Term | Definition | Avoid |
|
|
48
|
+
| --- | --- | --- |
|
|
49
|
+
| _TBD_ | | |
|
|
50
|
+
|
|
51
|
+
## ADR
|
|
52
|
+
|
|
53
|
+
Architecture decisions live in `docs/adr/` (lazy-created). Write an ADR only when **all three** conditions hold: hard to reverse · would surprise without context · real tradeoff. See `docs/adr/README.md` for the full boundary.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ADR — Architecture Decision Records
|
|
2
|
+
|
|
3
|
+
`docs/adr/` records architecture decisions. **Lazy-created**: the directory and `0001-*.md` files appear only when a real decision needs recording — do not pre-create them.
|
|
4
|
+
|
|
5
|
+
## When to write an ADR (all three conditions)
|
|
6
|
+
|
|
7
|
+
Write an ADR only when **all three** hold:
|
|
8
|
+
|
|
9
|
+
1. **Hard to reverse** — the decision is difficult or expensive to undo.
|
|
10
|
+
2. **Would surprise without context** — a future reader would ask "why is it this way?" without background.
|
|
11
|
+
3. **Real tradeoff** — there was a genuine choice between viable alternatives.
|
|
12
|
+
|
|
13
|
+
A single paragraph is enough. Number sequentially: `0001-<slug>.md`, `0002-<slug>.md`, …
|
|
14
|
+
|
|
15
|
+
## Three-layer boundary
|
|
16
|
+
|
|
17
|
+
| Layer | Owns |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| Knowledge base (rejections) | Rejection reasons / why-not |
|
|
20
|
+
| `docs/adr/` | Decision records / why-chosen |
|
|
21
|
+
| `.cstl/spec/` | Coding guidelines / conventions |
|
|
@@ -36,6 +36,8 @@ export declare const commonTaskContext: string;
|
|
|
36
36
|
export declare const commonTaskStore: string;
|
|
37
37
|
export declare const commonTaskDashboard: string;
|
|
38
38
|
export declare const commonTaskGates: string;
|
|
39
|
+
export declare const commonTaskDependencies: string;
|
|
40
|
+
export declare const commonPoolStore: string;
|
|
39
41
|
export declare const commonExecutionStrategy: string;
|
|
40
42
|
export declare const executionStrategyRulesJson: string;
|
|
41
43
|
export declare const commonTaskMap: string;
|
|
@@ -72,6 +74,8 @@ export declare const commonSafeCommit: string;
|
|
|
72
74
|
export declare const getDeveloperScript: string;
|
|
73
75
|
export declare const initDeveloperScript: string;
|
|
74
76
|
export declare const taskScript: string;
|
|
77
|
+
export declare const poolScript: string;
|
|
78
|
+
export declare const verifyEvidenceProbeScript: string;
|
|
75
79
|
export declare const getContextScript: string;
|
|
76
80
|
export declare const addSessionScript: string;
|
|
77
81
|
export declare const searchArtifactsScript: string;
|
|
@@ -84,6 +88,11 @@ export declare const codegraphSessionSmokeScript: string;
|
|
|
84
88
|
export declare const workflowMdTemplate: string;
|
|
85
89
|
export declare const configYamlTemplate: string;
|
|
86
90
|
export declare const gitignoreTemplate: string;
|
|
91
|
+
export declare const contextMdTemplate: string;
|
|
92
|
+
export declare const adrReadmeTemplate: string;
|
|
93
|
+
export declare const poolReadmeTemplate: string;
|
|
94
|
+
export declare const poolPlanTemplate: string;
|
|
95
|
+
export declare const poolItemsGitkeepTemplate: string;
|
|
87
96
|
/**
|
|
88
97
|
* Optional task artifact templates (under `.cstl/tasks/templates/`).
|
|
89
98
|
* Not applied by `task.py create`; copy into a new task directory when starting
|
|
@@ -100,4 +109,9 @@ export declare const MAINTAINER_ONLY_SCRIPT_PATHS: Set<string>;
|
|
|
100
109
|
* Init and update both use this as the single source of truth (no full-dir copy).
|
|
101
110
|
*/
|
|
102
111
|
export declare function getAllScripts(): Map<string, string>;
|
|
112
|
+
/**
|
|
113
|
+
* Review-pool skeleton files under `.cstl/pool/` (mechanism only).
|
|
114
|
+
* Init and update write these so users get pool CLI docs without sample items.
|
|
115
|
+
*/
|
|
116
|
+
export declare function getAllPoolSkeleton(): Map<string, string>;
|
|
103
117
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAcH,eAAO,MAAM,WAAW,QAAsC,CAAC;AAG/D,eA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