@blxzer/cursor-trellis 0.2.9 → 0.3.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 +64 -0
- package/README.md +37 -12
- package/README.zh-CN.md +41 -16
- package/bin/{trellis.js → cstl.js} +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +30 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/capability-smoke.d.ts +24 -0
- package/dist/commands/capability-smoke.d.ts.map +1 -0
- package/dist/commands/capability-smoke.js +83 -0
- package/dist/commands/capability-smoke.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +94 -34
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/uninstall.d.ts +1 -1
- package/dist/commands/uninstall.js +2 -2
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.d.ts +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +79 -34
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/upgrade.js +2 -2
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/configurators/cursor.d.ts +2 -2
- package/dist/configurators/cursor.js +4 -4
- package/dist/configurators/cursor.js.map +1 -1
- package/dist/configurators/index.js +3 -3
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/shared.d.ts +10 -10
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +26 -26
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts +2 -2
- package/dist/migrations/manifests/0.2.10.json +374 -0
- package/dist/migrations/manifests/0.3.0.json +89 -0
- package/dist/templates/common/bundled-skills/{trellis-cursor2plus-setup → cstl-cursor2plus-setup}/SKILL.md +5 -4
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/SKILL.md +75 -75
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/add-project-local-conventions.md +8 -8
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-agents.md +6 -6
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-context-loading.md +7 -7
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-skills-or-commands.md +1 -1
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-spec-structure.md +2 -2
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-task-lifecycle.md +31 -31
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-workflow.md +12 -12
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/overview.md +55 -55
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/context-injection.md +13 -13
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/generated-files.md +83 -83
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/overview.md +2 -2
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/spec-system.md +1 -1
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/task-system.md +22 -22
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/workflow.md +5 -5
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/workspace-memory.md +3 -3
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/agents.md +11 -11
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/hooks-and-settings.md +1 -1
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/overview.md +4 -4
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/platform-map.md +5 -5
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/skills-and-commands.md +15 -15
- package/dist/templates/common/bundled-skills/{trellis-micro-grill → cstl-micro-grill}/SKILL.md +62 -47
- package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/SKILL.md +44 -44
- package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/references/authoring-rules.md +97 -97
- package/dist/templates/common/bundled-skills/{trellis-skill-creator/references/trellis-skill-locations.md → cstl-skill-creator/references/cstl-skill-locations.md} +52 -52
- package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/references/review-checklist.md +47 -47
- package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/SKILL.md +1 -1
- package/dist/templates/common/commands/continue.md +20 -20
- package/dist/templates/common/commands/start.md +11 -11
- package/dist/templates/common/index.d.ts +1 -1
- package/dist/templates/common/index.d.ts.map +1 -1
- package/dist/templates/common/skills/brainstorm.md +188 -164
- package/dist/templates/common/skills/check.md +1 -1
- package/dist/templates/cursor/agents/{trellis-check.md → cstl-check.md} +8 -8
- package/dist/templates/cursor/agents/{trellis-implement.md → cstl-implement.md} +8 -8
- package/dist/templates/cursor/agents/{trellis-research.md → cstl-research.md} +2 -2
- package/dist/templates/cursor/commands/cursor2plus-setup.md +5 -5
- package/dist/templates/cursor/fixtures/expected-rules.d.ts +1 -1
- package/dist/templates/cursor/fixtures/expected-rules.d.ts.map +1 -1
- package/dist/templates/cursor/fixtures/expected-rules.js +2 -2
- package/dist/templates/cursor/fixtures/expected-rules.js.map +1 -1
- package/dist/templates/cursor/rules/{trellis-subagent-dispatch.mdc → cstl-subagent-dispatch.mdc} +2 -2
- package/dist/templates/cursor/rules/{trellis-triage.mdc → cstl-triage.mdc} +1 -1
- package/dist/templates/markdown/agents.md +4 -4
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +634 -634
- package/dist/templates/markdown/spec/guides/cursor-context-injection-guide.md.txt +4 -4
- package/dist/templates/markdown/spec/guides/cursor-semantic-compliance.md.txt +6 -0
- package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +393 -391
- package/dist/templates/markdown/spec/guides/durable-learning-decision-guide.md.txt +6 -6
- package/dist/templates/markdown/spec/guides/execution-strategy.md.txt +2 -2
- package/dist/templates/markdown/spec/guides/index.md.txt +3 -2
- package/dist/templates/shared-hooks/index.d.ts +1 -1
- package/dist/templates/shared-hooks/index.js +1 -1
- package/dist/templates/shared-hooks/inject-subagent-context.py +3 -3
- package/dist/templates/shared-hooks/inject-workflow-state.py +27 -27
- package/dist/templates/shared-hooks/research-end-retrieval-pack.py +1 -1
- package/dist/templates/shared-hooks/session-start.py +3 -3
- package/dist/templates/trellis/config/execution-strategy-rules.json +1 -1
- package/dist/templates/trellis/config.yaml +4 -4
- package/dist/templates/trellis/local/README.md +12 -10
- package/dist/templates/trellis/local/patch_wpelc8.py +3 -3
- package/dist/templates/trellis/local/subagent-models.json.example +1 -1
- package/dist/templates/trellis/local/trellis-task-models.json.example +3 -3
- package/dist/templates/trellis/local/trellis-task-models.json5.example +5 -5
- package/dist/templates/trellis/local/trellis_task_models_config.py +6 -6
- package/dist/templates/trellis/scripts/common/cli_adapter.py +3 -3
- package/dist/templates/trellis/scripts/common/execution_strategy.py +1 -1
- package/dist/templates/trellis/scripts/common/parent_orchestration.py +702 -702
- package/dist/templates/trellis/scripts/common/session_context.py +1159 -1159
- package/dist/templates/trellis/scripts/common/subagent_dispatch.py +5 -5
- package/dist/templates/trellis/scripts/common/task_gates.py +2056 -2034
- package/dist/templates/trellis/scripts/common/task_store.py +1594 -1594
- package/dist/templates/trellis/workflow.md +805 -805
- package/dist/types/ai-tools.d.ts +1 -1
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +1 -1
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/utils/project-capabilities.d.ts +14 -3
- package/dist/utils/project-capabilities.d.ts.map +1 -1
- package/dist/utils/project-capabilities.js +122 -12
- package/dist/utils/project-capabilities.js.map +1 -1
- package/dist/utils/readiness.d.ts +10 -0
- package/dist/utils/readiness.d.ts.map +1 -1
- package/dist/utils/readiness.js +6 -3
- package/dist/utils/readiness.js.map +1 -1
- package/package.json +3 -4
- /package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-hooks.md +0 -0
- /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/mcp-setup.md +0 -0
- /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/repository-analysis.md +0 -0
- /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/spec-task-planning.md +0 -0
- /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/spec-writing.md +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
# Continue Selected Task
|
|
2
|
-
|
|
3
|
-
Resume work only when this live session already has a `selected_task`. If no task is selected, show the Task Dashboard and ask for an explicit route.
|
|
1
|
+
# Continue Selected Task
|
|
2
|
+
|
|
3
|
+
Resume work only when this live session already has a `selected_task`. If no task is selected, show the Task Dashboard and ask for an explicit route.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## Step 1: Load Framework Context
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
{{PYTHON_CMD}} ./.trellis/scripts/get_context.py
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Confirms: selected task, Task Dashboard, git state, recent commits.
|
|
14
|
-
|
|
15
|
-
If the output says `Selected task: none`, do not auto-resume a previous or unique task. Show the dashboard and ask the user to choose one route:
|
|
16
|
-
|
|
17
|
-
- select a task with `{{PYTHON_CMD}} ./.trellis/scripts/task.py select <task>`
|
|
18
|
-
- create a task
|
|
19
|
-
- inspect details
|
|
20
|
-
- continue without a task for No Task / Micro-Grill work
|
|
7
|
+
## Step 1: Load Framework Context
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
{{PYTHON_CMD}} ./.trellis/scripts/get_context.py
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Confirms: selected task, Task Dashboard, git state, recent commits.
|
|
14
|
+
|
|
15
|
+
If the output says `Selected task: none`, do not auto-resume a previous or unique task. Show the dashboard and ask the user to choose one route:
|
|
16
|
+
|
|
17
|
+
- select a task with `{{PYTHON_CMD}} ./.trellis/scripts/task.py select <task>`
|
|
18
|
+
- create a task
|
|
19
|
+
- inspect details
|
|
20
|
+
- continue without a task for No Task / Micro-Grill work
|
|
21
21
|
|
|
22
22
|
## Step 2: Load the Phase Index
|
|
23
23
|
|
|
@@ -29,12 +29,12 @@ Shows the Phase Index (Plan / Execute / Finish) with routing + skill mapping.
|
|
|
29
29
|
|
|
30
30
|
## Step 3: Decide Where You Are
|
|
31
31
|
|
|
32
|
-
When a task is selected, `get_context.py` shows the selected task's `status` field. Route by `status` + artifact presence. This command replaces the user needing to remember the Trellis flow; it does not itself approve implementation.
|
|
32
|
+
When a task is selected, `get_context.py` shows the selected task's `status` field. Route by `status` + artifact presence. This command replaces the user needing to remember the Trellis flow; it does not itself approve implementation.
|
|
33
33
|
|
|
34
|
-
- `status=planning` + no `prd.md` → **1.1** (load `
|
|
34
|
+
- `status=planning` + no `prd.md` → **1.1** (load `cstl-brainstorm`)
|
|
35
35
|
- `status=planning` + `prd.md` only → decide whether the task is lightweight or complex. Lightweight can move to **1.4** review; complex returns to **1.1** to add `design.md` + `implement.md`.
|
|
36
36
|
- `status=planning` + complex artifacts complete + sub-agent jsonl not curated (only the seed `_example` row) → **1.3**
|
|
37
|
-
- `status=planning` + required artifacts complete + required jsonl curated or inline mode → execution gate (run `task.py start-execution <task> --check`, report PASS, ask for explicit execution approval, then run `task.py start-execution <task> --approved`)
|
|
37
|
+
- `status=planning` + required artifacts complete + required jsonl curated or inline mode → execution gate (run `task.py start-execution <task> --check`, report PASS, ask for explicit execution approval, then run `task.py start-execution <task> --approved`)
|
|
38
38
|
- `status=in_progress` + implementation not started → **2.1**
|
|
39
39
|
- `status=in_progress` + implementation done, not yet checked → **2.2**
|
|
40
40
|
- `status=in_progress` + check passed → **3.1**
|
|
@@ -36,14 +36,14 @@ Index files list the specific guideline docs to read when you actually start cod
|
|
|
36
36
|
## Step 4: Decide next action
|
|
37
37
|
From Step 1 you know whether a task is selected.
|
|
38
38
|
|
|
39
|
-
- If `Selected task: none` → show the Task Dashboard; do **not** load `
|
|
40
|
-
- If a task **is** selected and you need the next workflow step → use `
|
|
39
|
+
- If `Selected task: none` → show the Task Dashboard; do **not** load `cstl-continue`. For a **small** request without a task, use `cstl-micro-grill` first.
|
|
40
|
+
- If a task **is** selected and you need the next workflow step → use `cstl-continue` instead of repeating Steps 1–3 here.
|
|
41
41
|
|
|
42
42
|
If `Selected task: none`, ask the user to choose: select a task, create a task, inspect details, or continue without a task.
|
|
43
43
|
|
|
44
44
|
If a task is selected, check the task directory:
|
|
45
45
|
|
|
46
|
-
- **Selected task status `planning` + no `prd.md`** → Phase 1.1. Load the `
|
|
46
|
+
- **Selected task status `planning` + no `prd.md`** → Phase 1.1. Load the `cstl-brainstorm` skill.
|
|
47
47
|
- **Selected task status `planning` + `prd.md` exists** → stay in Planning / Execution Gate. Lightweight tasks can be PRD-only; complex tasks need `design.md` + `implement.md`. Run `task.py start-execution <task> --check` and request explicit execution approval before execution.
|
|
48
48
|
- **Selected task status `in_progress`** → Phase 2 step 2.1. Load the step detail:
|
|
49
49
|
```bash
|
|
@@ -57,13 +57,13 @@ If a task is selected, check the task directory:
|
|
|
57
57
|
|
|
58
58
|
| User intent | Skill |
|
|
59
59
|
|---|---|
|
|
60
|
-
| Resume **selected** in-progress task | `
|
|
61
|
-
| New feature / unclear requirements | `
|
|
62
|
-
| Small request, no task yet | `
|
|
63
|
-
| About to write code | `
|
|
64
|
-
| Done coding / quality check | `
|
|
65
|
-
| Session wrap-up after Phase 3.4 commit | `
|
|
66
|
-
| Stuck / fixed same bug multiple times | `
|
|
67
|
-
| Learned something worth capturing | `
|
|
60
|
+
| Resume **selected** in-progress task | `cstl-continue` |
|
|
61
|
+
| New feature / unclear requirements | `cstl-brainstorm` |
|
|
62
|
+
| Small request, no task yet | `cstl-micro-grill` |
|
|
63
|
+
| About to write code | `cstl-before-dev` |
|
|
64
|
+
| Done coding / quality check | `cstl-check` |
|
|
65
|
+
| Session wrap-up after Phase 3.4 commit | `cstl-finish-work` |
|
|
66
|
+
| Stuck / fixed same bug multiple times | `cstl-break-loop` |
|
|
67
|
+
| Learned something worth capturing | `cstl-update-spec` |
|
|
68
68
|
|
|
69
69
|
Full rules + anti-rationalization table in `.trellis/workflow.md`.
|
|
@@ -23,7 +23,7 @@ export interface CommonBundledSkillFile {
|
|
|
23
23
|
content: string;
|
|
24
24
|
}
|
|
25
25
|
export interface CommonBundledSkill {
|
|
26
|
-
/** Skill directory name, e.g. "
|
|
26
|
+
/** Skill directory name, e.g. "cstl-meta" */
|
|
27
27
|
name: string;
|
|
28
28
|
/** Files that must be written under the skill directory */
|
|
29
29
|
files: CommonBundledSkillFile[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAuBH,MAAM,WAAW,cAAc;IAC7B,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,4EAA4E;IAC5E,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAuBH,MAAM,WAAW,cAAc;IAC7B,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,4EAA4E;IAC5E,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,KAAK,EAAE,sBAAsB,EAAE,CAAC;CACjC;AAOD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,cAAc,EAAE,CAMtD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,EAAE,CAMpD;AAuCD;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,kBAAkB,EAAE,CAM/D"}
|
|
@@ -1,165 +1,189 @@
|
|
|
1
|
-
# Trellis Brainstorm
|
|
2
|
-
|
|
3
|
-
## Non-Negotiable Interview Contract
|
|
4
|
-
|
|
5
|
-
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
6
|
-
|
|
7
|
-
Ask the questions one at a time.
|
|
8
|
-
|
|
9
|
-
## Non-Negotiable Evidence Rule
|
|
10
|
-
|
|
11
|
-
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
12
|
-
|
|
13
|
-
This is mandatory. Before asking the user a question, first check whether the answer is already available in code, tests, configs, docs, existing specs, or task history.
|
|
14
|
-
|
|
15
|
-
Do not ask the user to confirm facts that the repository can answer. Ask only for product intent, preference, scope, risk tolerance, or decisions that remain ambiguous after inspection.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
If no
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
##
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
1
|
+
# Trellis Brainstorm
|
|
2
|
+
|
|
3
|
+
## Non-Negotiable Interview Contract
|
|
4
|
+
|
|
5
|
+
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
6
|
+
|
|
7
|
+
Ask the questions one at a time.
|
|
8
|
+
|
|
9
|
+
## Non-Negotiable Evidence Rule
|
|
10
|
+
|
|
11
|
+
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
12
|
+
|
|
13
|
+
This is mandatory. Before asking the user a question, first check whether the answer is already available in code, tests, configs, docs, existing specs, or task history.
|
|
14
|
+
|
|
15
|
+
Do not ask the user to confirm facts that the repository can answer. Ask only for product intent, preference, scope, risk tolerance, or decisions that remain ambiguous after inspection.
|
|
16
|
+
|
|
17
|
+
## Thinking Principles
|
|
18
|
+
|
|
19
|
+
These two principles shape *how* you grill, not just *what* you ask. Apply them throughout Phase A and B.
|
|
20
|
+
|
|
21
|
+
### First Principles
|
|
22
|
+
|
|
23
|
+
Reason from irreducible facts and user value, not from analogy to existing solutions or "how it's always been done".
|
|
24
|
+
|
|
25
|
+
- When you encounter a requirement phrased as "we need X like Y has", separate the **root need** (the user value behind X) from the **inherited assumption** (Y's specific shape).
|
|
26
|
+
- For every "because that's the convention" justification, ask: what problem did that convention solve, and does that problem actually exist here?
|
|
27
|
+
- Trace each requirement back to a user-facing outcome. If no outcome survives, the requirement is inherited, not fundamental — flag it as a candidate for Out of Scope.
|
|
28
|
+
|
|
29
|
+
### Occam's Razor
|
|
30
|
+
|
|
31
|
+
Among competing designs that satisfy the acceptance criteria, prefer the one with the fewest additional assumptions.
|
|
32
|
+
|
|
33
|
+
- Default recommendation = the **minimal sufficient** design. Complexity must be justified by evidence (a contract, an edge case, a verified constraint), not added speculatively "for later".
|
|
34
|
+
- Actively strip scope that exists only to satisfy an assumption you cannot verify from repo evidence.
|
|
35
|
+
- When two paths are equally sufficient, the simpler one wins; the burden of proof is on the more complex path.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
Use this skill during Phase 1 planning to turn the user's request into clear requirements and planning artifacts.
|
|
40
|
+
|
|
41
|
+
**Agent-capable platforms:** Do **not** use legacy Claude-only grill subagents as a hard gate. Complete **PRD Grill** (below) and **`cstl-micro-grill`** for blocking open questions before treating planning as ready for `design.md` / `implement.md` / `start-execution --check`.
|
|
42
|
+
|
|
43
|
+
## Preconditions
|
|
44
|
+
|
|
45
|
+
Use this skill only after task-creation consent has been given and the user is ready to enter Trellis planning.
|
|
46
|
+
|
|
47
|
+
If no task exists yet, create one:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
TASK_DIR=$(python ./.trellis/scripts/task.py create "<short task title>" --slug <slug>)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Use a concise title from the user's request. Use a slug without a date prefix. `task.py create` adds the `MM-DD-` directory prefix automatically.
|
|
54
|
+
|
|
55
|
+
`task.py create` creates the default `prd.md`. Update that file with the current understanding before asking follow-up questions.
|
|
56
|
+
|
|
57
|
+
## Two-phase planning overview
|
|
58
|
+
|
|
59
|
+
| Phase | Name | User questions |
|
|
60
|
+
| --- | --- | --- |
|
|
61
|
+
| **A** | Discovery Before Questions + PRD draft | None until repo evidence is exhausted |
|
|
62
|
+
| **B** | PRD Grill pass + Micro-grill unresolved | Only blocking business / risk / preference |
|
|
63
|
+
|
|
64
|
+
External facts during Discovery or Research: load `smart-search-cli`; on CLI/doctor failure use Cursor WebSearch/WebFetch and persist under `{TASK}/research/` with `source: cursor-web-fallback`.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Phase A — Discovery Before Questions
|
|
69
|
+
|
|
70
|
+
Run **before** any user interview questions.
|
|
71
|
+
|
|
72
|
+
Inspect and record in `prd.md` (sections: **Confirmed facts**, initial **Out of scope**, draft **Goal**):
|
|
73
|
+
|
|
74
|
+
1. **Code & tests** — relevant modules, fixtures, configs, error paths.
|
|
75
|
+
2. **Specs** — `.trellis/spec/` indexes and layer guides for touched packages.
|
|
76
|
+
3. **History** — archived tasks, active task research, developer journal when useful.
|
|
77
|
+
4. **Platform** — project platform hooks, agents, and skills (see `.trellis/spec/guides/cursor-subagent-policy.md` when using Cursor); shared `.agents/skills/` when behavior spans platforms.
|
|
78
|
+
5. **Parent/Child** — if multiple independent deliverables, note child split early in `prd.md`.
|
|
79
|
+
|
|
80
|
+
Use retrieval per `.trellis/spec/guides/retrieval-daily-guide.md` (rg for literals, codegraph for structure, fast-context for semantic sweep).
|
|
81
|
+
|
|
82
|
+
Dispatch **`cstl-research`** (writable Agent) when a topic needs a dedicated `{TASK}/research/<topic>.md` file; do **not** use a subagent for PRD Grill itself.
|
|
83
|
+
|
|
84
|
+
## Phase A — PRD draft
|
|
85
|
+
|
|
86
|
+
After Discovery, flesh out `prd.md`:
|
|
87
|
+
|
|
88
|
+
- goal and user value
|
|
89
|
+
- confirmed facts (not restated as unverified requirements)
|
|
90
|
+
- requirements
|
|
91
|
+
- draft acceptance criteria
|
|
92
|
+
- out of scope
|
|
93
|
+
- open questions (tag **blocking** vs **nice-to-have**)
|
|
94
|
+
|
|
95
|
+
For complex tasks, start `design.md` / `implement.md` skeletons only when boundaries are already clear from Discovery; otherwise wait until Phase B.
|
|
96
|
+
|
|
97
|
+
## Phase B — PRD Grill pass
|
|
98
|
+
|
|
99
|
+
Treat `prd.md` (+ existing `design.md` fragments) as the **only document surface**. Run this checklist; fix the PRD in place (no new subagent):
|
|
100
|
+
|
|
101
|
+
| # | Check |
|
|
102
|
+
| --- | --- |
|
|
103
|
+
| 1 | **Goal & user value** — single clear statement |
|
|
104
|
+
| 2 | **Confirmed facts vs assumptions** — repo facts not listed as assumptions |
|
|
105
|
+
| 3 | **Testable acceptance criteria** |
|
|
106
|
+
| 4 | **Out of scope** explicit |
|
|
107
|
+
| 5 | **Dependencies & sequencing** |
|
|
108
|
+
| 6 | **Parent/Child & deliverables** when applicable |
|
|
109
|
+
| 7 | **Research & external facts** — smart-search or documented fallback |
|
|
110
|
+
| 8 | **Execution gate & artifacts** — `design.md` / `implement.md` / `verify.md` expectations |
|
|
111
|
+
| 9 | **Durable Learning** — Phase 3.3 will need `update-spec` \| `no-update` \| `unsure` |
|
|
112
|
+
| 10 | **Platform** — Cursor-first; PRD Grill in-session (no legacy grill-me / grill-with-docs subagent gate) |
|
|
113
|
+
| 11 | **Risk & rollback** for complex tasks |
|
|
114
|
+
| 12 | **Open questions** — only **blocking** strategic/preference items remain |
|
|
115
|
+
| 13 | **Root vs inherited assumptions** — every requirement traces to a user-facing root need; inherited assumptions (convention, analogy, "we've always done it") are flagged or removed (First Principles) |
|
|
116
|
+
| 14 | **Minimal sufficient design** — no scope, layer, or mechanism exists to satisfy an unverified assumption; the simplest design that meets acceptance wins (Occam's Razor) |
|
|
117
|
+
|
|
118
|
+
## Phase B — Micro-grill unresolved
|
|
119
|
+
|
|
120
|
+
For each **blocking** open question after the checklist, embed the **`cstl-micro-grill` contract**:
|
|
121
|
+
|
|
122
|
+
- exactly **one** question per message
|
|
123
|
+
- **Simplified Chinese** for user-facing text
|
|
124
|
+
- recommended answer + trade-off
|
|
125
|
+
- **update `prd.md` after every answer** before the next question
|
|
126
|
+
|
|
127
|
+
Stop micro-grill when no blocking open questions remain.
|
|
128
|
+
|
|
129
|
+
Do not ask process questions ("should I search?"). Do not re-ask facts Discovery already confirmed.
|
|
130
|
+
|
|
131
|
+
## Question Rules (Phase B only)
|
|
132
|
+
|
|
133
|
+
Each question must include:
|
|
134
|
+
|
|
135
|
+
- the decision needed
|
|
136
|
+
- why the answer matters
|
|
137
|
+
- your recommended answer
|
|
138
|
+
- the trade-off if the user chooses differently
|
|
139
|
+
|
|
140
|
+
Your recommended answer defaults to Occam's Razor: the **minimal sufficient** option that still satisfies the acceptance criteria. Only recommend a more complex option when you can cite evidence (a contract, a verified edge case, a repo constraint) that the simpler option violates.
|
|
141
|
+
|
|
142
|
+
## Artifact Rules
|
|
143
|
+
|
|
144
|
+
`prd.md` records requirements and acceptance:
|
|
145
|
+
|
|
146
|
+
- goal and user value
|
|
147
|
+
- confirmed facts
|
|
148
|
+
- requirements
|
|
149
|
+
- acceptance criteria
|
|
150
|
+
- out of scope
|
|
151
|
+
- open questions that still block planning
|
|
152
|
+
|
|
153
|
+
`design.md` records technical design for complex tasks:
|
|
154
|
+
|
|
155
|
+
- architecture and boundaries
|
|
156
|
+
- data flow and contracts
|
|
157
|
+
- compatibility and migration notes
|
|
158
|
+
- important trade-offs
|
|
159
|
+
- operational or rollback considerations
|
|
160
|
+
|
|
161
|
+
`implement.md` records execution planning for complex tasks:
|
|
162
|
+
|
|
163
|
+
- ordered implementation checklist
|
|
164
|
+
- validation commands
|
|
165
|
+
- risky files or rollback points
|
|
166
|
+
- **Development Strategy Contract** (`execution_mode`, `isolation`, …): before finalizing, run `python3 ./.trellis/scripts/task.py suggest-execution-strategy <task-dir>` (or `--json`); reconcile suggestion with scope, then paste the approved YAML block into `implement.md`
|
|
167
|
+
- follow-up checks before `task.py start-execution --check`
|
|
168
|
+
|
|
169
|
+
Lightweight tasks may have only `prd.md`. Complex tasks must have `prd.md`, `design.md`, and `implement.md` before `task.py start-execution --check`.
|
|
170
|
+
|
|
171
|
+
`implement.md` is not a replacement for `implement.jsonl`. Use JSONL files only for manifest-style spec and research references when the task needs them.
|
|
172
|
+
|
|
173
|
+
## Completion criteria — PRD Grill done
|
|
174
|
+
|
|
175
|
+
Planning is ready for execution gate when **all** hold:
|
|
176
|
+
|
|
177
|
+
- PRD Grill checklist (14 items) satisfied or explicitly N/A with rationale in `prd.md`
|
|
178
|
+
- **No blocking** open questions in `prd.md`
|
|
179
|
+
- Acceptance criteria are testable; out of scope is explicit
|
|
180
|
+
- Complex tasks: `design.md` and `implement.md` present
|
|
181
|
+
- User reviewed artifacts or explicitly approved proceeding
|
|
182
|
+
|
|
183
|
+
Then proceed to Phase 1.2 Research (if needed), Phase 1.4 `task.py start-execution --check`, and implementation only after user approval.
|
|
184
|
+
|
|
185
|
+
Do not start implementation until the user approves or asks for implementation.
|
|
186
|
+
|
|
187
|
+
## Legacy planning flow (summary)
|
|
188
|
+
|
|
165
189
|
The former single "Planning Flow" is now Phase A + B above. Steps 4–6 map to Phase B micro-grill and artifact updates.
|
|
@@ -61,7 +61,7 @@ Run the project's lint, type-check, and test commands. Fix any failures before p
|
|
|
61
61
|
|
|
62
62
|
### Spec Sync
|
|
63
63
|
|
|
64
|
-
- [ ] Does `.trellis/spec/` need updates? (route through semi-automatic flow: proposal → confirm → `
|
|
64
|
+
- [ ] Does `.trellis/spec/` need updates? (route through semi-automatic flow: proposal → confirm → `cstl-update-spec`)
|
|
65
65
|
|
|
66
66
|
> "If I fixed a bug or discovered something non-obvious, should I document it so future me won't hit the same issue?" → If YES, update the relevant spec doc.
|
|
67
67
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: cstl-check
|
|
3
3
|
description: Trellis quality check agent. Use this exact agent for Trellis task verification, check.jsonl context injection, and self-fixing code review. Do not use generic/default/generalPurpose agents for Trellis checks.
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
5
5
|
---
|
|
@@ -11,7 +11,7 @@ tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__
|
|
|
11
11
|
|
|
12
12
|
## Context source
|
|
13
13
|
|
|
14
|
-
- **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(
|
|
14
|
+
- **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(cstl-check)`.
|
|
15
15
|
- **Hook `additional_context` = best-effort only** — Cursor #158452: not guaranteed to reach the model; optimization / fallback only.
|
|
16
16
|
|
|
17
17
|
# Check Agent
|
|
@@ -25,15 +25,15 @@ You are the Check Agent in the Trellis workflow.
|
|
|
25
25
|
|
|
26
26
|
## Recursion Guard
|
|
27
27
|
|
|
28
|
-
You are already the `
|
|
28
|
+
You are already the `cstl-check` sub-agent that the main session dispatched. Do the review and fixes directly.
|
|
29
29
|
|
|
30
|
-
- Do NOT spawn another `
|
|
31
|
-
- If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `
|
|
30
|
+
- Do NOT spawn another `cstl-check` or `cstl-implement` sub-agent.
|
|
31
|
+
- If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `cstl-implement` / `cstl-check`, treat that as a main-session instruction that is already satisfied by your current role.
|
|
32
32
|
- Only the main session may dispatch Trellis implement/check agents. If more implementation work is needed, report that recommendation instead of spawning.
|
|
33
33
|
|
|
34
34
|
## Trellis Context Loading Protocol
|
|
35
35
|
|
|
36
|
-
Look for the `<!--
|
|
36
|
+
Look for the `<!-- cstl-hook-injected -->` marker in your input above.
|
|
37
37
|
|
|
38
38
|
- **If the marker is present**: task artifacts, spec, and research files have already been auto-loaded for you above. Proceed with the check work directly.
|
|
39
39
|
- **If the marker is absent**: hook injection didn't fire (Windows + Claude Code, `--continue` resume, fork distribution, hooks disabled, etc.). Find the selected task path from your dispatch prompt's first line `Selected task: <path>`, then Read `<task-path>/check.jsonl`, each listed file, `<task-path>/prd.md`, `<task-path>/design.md` if present, and `<task-path>/implement.md` if present before doing the work.
|
|
@@ -41,8 +41,8 @@ Look for the `<!-- trellis-hook-injected -->` marker in your input above.
|
|
|
41
41
|
## Dispatch contract (Parent / inline)
|
|
42
42
|
|
|
43
43
|
- Only the **main session or Parent** dispatches this agent; Child workers must not re-spawn Trellis sub-agents.
|
|
44
|
-
- **Inline** (`in_progress-inline`): main session uses the `
|
|
45
|
-
- Align with the `
|
|
44
|
+
- **Inline** (`in_progress-inline`): main session uses the `cstl-check` **skill** instead of spawning this agent unless a dedicated review pass is needed.
|
|
45
|
+
- Align with the `cstl-check` skill: `get_context.py --mode packages`, spec indexes, cross-layer checks; you may fix issues and record gates — do not redefine Parent `task-map` or gate semantics.
|
|
46
46
|
|
|
47
47
|
## Context
|
|
48
48
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: cstl-implement
|
|
3
3
|
description: Trellis implementation agent. Use this exact agent for Trellis task implementation, implement.jsonl context injection, and hook-injection tests. Do not use generic/default/generalPurpose agents for Trellis implementation. No git commit allowed.
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
5
5
|
---
|
|
@@ -11,7 +11,7 @@ tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__
|
|
|
11
11
|
|
|
12
12
|
## Context source
|
|
13
13
|
|
|
14
|
-
- **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(
|
|
14
|
+
- **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(cstl-implement)`.
|
|
15
15
|
- **Hook `additional_context` = best-effort only** — Cursor #158452: not guaranteed to reach the model; optimization / fallback only.
|
|
16
16
|
|
|
17
17
|
# Implement Agent
|
|
@@ -21,19 +21,19 @@ You are the Implement Agent in the Trellis workflow.
|
|
|
21
21
|
## Model policy
|
|
22
22
|
|
|
23
23
|
- **Default:** no `model:` → **inherit** parent session.
|
|
24
|
-
- **Per dispatch / Child worker:** main session asks user → one-shot `model:` overlay on this file → `Task` → restore. Child session uses the same overlay pattern on `
|
|
24
|
+
- **Per dispatch / Child worker:** main session asks user → one-shot `model:` overlay on this file → `Task` → restore. Child session uses the same overlay pattern on `cstl-implement`. See `.trellis/spec/guides/cursor-subagent-policy.md`.
|
|
25
25
|
|
|
26
26
|
## Recursion Guard
|
|
27
27
|
|
|
28
|
-
You are already the `
|
|
28
|
+
You are already the `cstl-implement` sub-agent that the main session dispatched. Do the implementation work directly.
|
|
29
29
|
|
|
30
|
-
- Do NOT spawn another `
|
|
31
|
-
- If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `
|
|
30
|
+
- Do NOT spawn another `cstl-implement` or `cstl-check` sub-agent.
|
|
31
|
+
- If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `cstl-implement` / `cstl-check`, treat that as a main-session instruction that is already satisfied by your current role.
|
|
32
32
|
- Only the main session may dispatch Trellis implement/check agents. If more parallel work is needed, report that recommendation instead of spawning.
|
|
33
33
|
|
|
34
34
|
## Trellis Context Loading Protocol
|
|
35
35
|
|
|
36
|
-
Look for the `<!--
|
|
36
|
+
Look for the `<!-- cstl-hook-injected -->` marker in your input above.
|
|
37
37
|
|
|
38
38
|
- **If the marker is present**: prd / spec / research files have already been auto-loaded for you above. Proceed with the implementation work directly.
|
|
39
39
|
- **If the marker is absent**: hook injection didn't fire (Windows + Claude Code, `--continue` resume, fork distribution, hooks disabled, `/multitask` parallel dispatch, etc.). Find the selected task path from your dispatch prompt's first line `Selected task: <path>`, then Read `<task-path>/implement.jsonl`, each listed file, `<task-path>/prd.md`, `<task-path>/design.md` if present, and `<task-path>/implement.md` if present before doing the work.
|
|
@@ -41,7 +41,7 @@ Look for the `<!-- trellis-hook-injected -->` marker in your input above.
|
|
|
41
41
|
## Dispatch contract (Parent / Child)
|
|
42
42
|
|
|
43
43
|
- Parent or main session dispatches implement work; **Child tasks** deliver `verify.md` + `handoff.md` and must not change shared gate contracts.
|
|
44
|
-
- Do not spawn nested `
|
|
44
|
+
- Do not spawn nested `cstl-implement` / `cstl-check`; recommend a Parent review when check is needed.
|
|
45
45
|
|
|
46
46
|
## Context
|
|
47
47
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: cstl-research
|
|
3
3
|
description: Trellis research agent. Use this exact agent for Trellis task research and research/ persistence. Do not use generic/default/generalPurpose agents for Trellis research.
|
|
4
4
|
tools: Read, Write, Glob, Grep, Bash, WebSearch, WebFetch, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa, Skill, mcp__chrome-devtools__*
|
|
5
5
|
---
|
|
@@ -11,7 +11,7 @@ tools: Read, Write, Glob, Grep, Bash, WebSearch, WebFetch, mcp__exa__web_search_
|
|
|
11
11
|
|
|
12
12
|
## Context source
|
|
13
13
|
|
|
14
|
-
- **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(
|
|
14
|
+
- **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(cstl-research)`.
|
|
15
15
|
- **Hook `additional_context` = best-effort only** — Cursor #158452: not guaranteed to reach the model; optimization / fallback only.
|
|
16
16
|
|
|
17
17
|
# Research Agent
|