@blxzer/cursor-trellis 0.2.8 → 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 +89 -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.2.9.json +9 -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/bundled-skills/smart-search-cli/SKILL.md +7 -8
- package/dist/templates/common/bundled-skills/smart-search-cli/references/cli-contract.md +46 -46
- 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/markdown/spec/guides/retrieval-daily-guide.md.txt +12 -0
- 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/smart_search_evidence.py +33 -1
- 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 +4 -5
- /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
|
@@ -6,10 +6,10 @@ Trellis context injection aims to make AI read the right files at the right time
|
|
|
6
6
|
|
|
7
7
|
| Type | Source | Purpose |
|
|
8
8
|
| --- | --- | --- |
|
|
9
|
-
| session context | `.trellis/scripts/get_context.py` | Current developer, git status, selected task, Task Dashboard, active tasks, journal, packages. |
|
|
9
|
+
| session context | `.trellis/scripts/get_context.py` | Current developer, git status, selected task, Task Dashboard, active tasks, journal, packages. |
|
|
10
10
|
| workflow context | `.trellis/workflow.md` | Current Trellis flow and next action. |
|
|
11
11
|
| spec context | `.trellis/spec/` + task JSONL | Specs that must be followed during implementation/checking. |
|
|
12
|
-
| task context | `.trellis/tasks/<task>/prd.md`, `design.md`, `implement.md`, `research/` | Selected task requirements, design, execution plan, and research. |
|
|
12
|
+
| task context | `.trellis/tasks/<task>/prd.md`, `design.md`, `implement.md`, `research/` | Selected task requirements, design, execution plan, and research. |
|
|
13
13
|
| platform context | Platform hooks/settings/agents | Lets different AI tools read the files above through their own mechanisms. |
|
|
14
14
|
|
|
15
15
|
## session-start
|
|
@@ -17,16 +17,16 @@ Trellis context injection aims to make AI read the right files at the right time
|
|
|
17
17
|
Platforms with session-start support inject a Trellis overview when a session starts, clears, compacts, or receives a similar event. Injected content usually includes:
|
|
18
18
|
|
|
19
19
|
- workflow summary.
|
|
20
|
-
- selected task status.
|
|
21
|
-
- active tasks.
|
|
20
|
+
- selected task status.
|
|
21
|
+
- active tasks.
|
|
22
22
|
- spec index paths.
|
|
23
23
|
- developer identity and git status.
|
|
24
24
|
|
|
25
|
-
If the user feels the AI does not know the selected task in a new session, first check whether the platform's session-start hook or equivalent mechanism is installed and running.
|
|
25
|
+
If the user feels the AI does not know the selected task in a new session, first check whether the platform's session-start hook or equivalent mechanism is installed and running.
|
|
26
26
|
|
|
27
27
|
## workflow-state
|
|
28
28
|
|
|
29
|
-
workflow-state is a lightweight hint injected around each user turn. Based on selected task status, it selects a block from `.trellis/workflow.md`, such as `no_task`, `planning`, `in_progress`, or `completed`.
|
|
29
|
+
workflow-state is a lightweight hint injected around each user turn. Based on selected task status, it selects a block from `.trellis/workflow.md`, such as `no_task`, `planning`, `in_progress`, or `completed`.
|
|
30
30
|
|
|
31
31
|
If the user wants to change "what the AI should do next in a given state," edit the corresponding state block in `.trellis/workflow.md` first.
|
|
32
32
|
|
|
@@ -35,7 +35,7 @@ If the user wants to change "what the AI should do next in a given state," edit
|
|
|
35
35
|
Implement and check agents need task context. Trellis has two loading modes:
|
|
36
36
|
|
|
37
37
|
1. **hook push**: a platform hook injects jsonl-referenced files plus `prd.md`, `design.md` if present, and `implement.md` if present before the agent starts.
|
|
38
|
-
2. **agent pull**: the agent definition instructs the agent to read the selected task, jsonl context, and task artifacts after startup.
|
|
38
|
+
2. **agent pull**: the agent definition instructs the agent to read the selected task, jsonl context, and task artifacts after startup.
|
|
39
39
|
|
|
40
40
|
In both modes, JSONL files in the task directory are the manifest for spec/research context. Task artifacts are read separately in this order: `prd.md` -> `design.md if present` -> `implement.md if present`.
|
|
41
41
|
|
|
@@ -49,11 +49,11 @@ In both modes, JSONL files in the task directory are the manifest for spec/resea
|
|
|
49
49
|
|
|
50
50
|
Readers should skip seed rows without a `file` field. When configuring JSONL, the AI should include only spec/research files, not pre-register code files that will be modified.
|
|
51
51
|
|
|
52
|
-
## Selected Task And Context Key
|
|
53
|
-
|
|
54
|
-
Selected task state lives in `.trellis/.runtime/sessions/` and is isolated per session. Hooks try to resolve the context key from platform events, environment variables, transcript paths, or `TRELLIS_CONTEXT_ID`.
|
|
55
|
-
|
|
56
|
-
If shell commands cannot see the same context key, `task.py selected --source` may report no selected task. In that case, check whether the platform passes session identity into the shell instead of hand-writing a global current-task file.
|
|
52
|
+
## Selected Task And Context Key
|
|
53
|
+
|
|
54
|
+
Selected task state lives in `.trellis/.runtime/sessions/` and is isolated per session. Hooks try to resolve the context key from platform events, environment variables, transcript paths, or `TRELLIS_CONTEXT_ID`.
|
|
55
|
+
|
|
56
|
+
If shell commands cannot see the same context key, `task.py selected --source` may report no selected task. In that case, check whether the platform passes session identity into the shell instead of hand-writing a global current-task file.
|
|
57
57
|
|
|
58
58
|
## Local Customization Points
|
|
59
59
|
|
|
@@ -63,6 +63,6 @@ If shell commands cannot see the same context key, `task.py selected --source` m
|
|
|
63
63
|
| Change per-turn workflow-state rules | `[workflow-state:STATUS]` block in `.trellis/workflow.md`. The platform workflow-state hook parses these blocks verbatim and embeds no fallback text. |
|
|
64
64
|
| Change how sub-agents read context | Platform agent definitions, the `inject-subagent-context` hook, or agent preludes. |
|
|
65
65
|
| Change JSONL validation/display | `.trellis/scripts/common/task_context.py`. |
|
|
66
|
-
| Change selected task resolution | `.trellis/scripts/common/active_task.py`. |
|
|
66
|
+
| Change selected task resolution | `.trellis/scripts/common/active_task.py`. |
|
|
67
67
|
|
|
68
68
|
When modifying context injection, verify two things: new sessions can see the correct task, and sub-agents can see the correct task artifacts/spec/research.
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
# Local Files Generated After Init
|
|
2
|
-
|
|
3
|
-
`
|
|
4
|
-
|
|
5
|
-
This page only describes files that are visible and editable inside the user project.
|
|
6
|
-
|
|
7
|
-
## `.trellis/`
|
|
8
|
-
|
|
9
|
-
```text
|
|
10
|
-
.trellis/
|
|
11
|
-
├── workflow.md
|
|
12
|
-
├── config.yaml
|
|
13
|
-
├── .developer
|
|
14
|
-
├── .version
|
|
15
|
-
├── .template-hashes.json
|
|
16
|
-
├── .runtime/
|
|
17
|
-
├── scripts/
|
|
18
|
-
├── spec/
|
|
19
|
-
├── tasks/
|
|
20
|
-
└── workspace/
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
| Path | Usually editable? | Notes |
|
|
24
|
-
| --- | --- | --- |
|
|
25
|
-
| `.trellis/workflow.md` | Yes | Local workflow documentation and AI routing rules. |
|
|
26
|
-
| `.trellis/config.yaml` | Yes | Project configuration, hooks, packages, journal line limits, and related settings. |
|
|
27
|
-
| `.trellis/spec/` | Yes | Project specs, intended to be updated regularly by users and AI. |
|
|
28
|
-
| `.trellis/tasks/` | Yes | Task material and research artifacts, maintained by the task workflow. |
|
|
29
|
-
| `.trellis/workspace/` | Yes | Session records, usually written by `add_session.py`. |
|
|
30
|
-
| `.trellis/scripts/` | Carefully | Local runtime. It can be customized, but only after understanding the call chain. |
|
|
31
|
-
| `.trellis/.runtime/` | No | Runtime state, usually written automatically by hooks/scripts. |
|
|
32
|
-
| `.trellis/.developer` | Carefully | Current developer identity. |
|
|
33
|
-
| `.trellis/.version` | No | Trellis version record used by update/migration logic. |
|
|
34
|
-
| `.trellis/.template-hashes.json` | No | Template hash record. Do not hand-write business rules here. |
|
|
35
|
-
|
|
36
|
-
## Platform Directories
|
|
37
|
-
|
|
38
|
-
On a fresh `
|
|
39
|
-
|
|
40
|
-
Common categories inside `.cursor/`:
|
|
41
|
-
|
|
42
|
-
| Category | Path | Purpose |
|
|
43
|
-
| --- | --- | --- |
|
|
44
|
-
| hooks | `.cursor/hooks/` | Hook scripts invoked from `.cursor/hooks.json`. Inject session context, workflow-state, and sub-agent context. |
|
|
45
|
-
| settings/registration | `.cursor/hooks.json` | Registers which scripts run on which Cursor events. |
|
|
46
|
-
| rules | `.cursor/rules/*.mdc` (`alwaysApply: true`) | Per-turn policy prepended before every prompt. |
|
|
47
|
-
| agents | `.cursor/agents/` | Define agents such as `
|
|
48
|
-
| skills | `.cursor/skills/` | Skills that auto-trigger or can be read by AI. |
|
|
49
|
-
| commands | `.cursor/commands/` | Legacy compatibility-only user-invoked entry points. |
|
|
50
|
-
|
|
51
|
-
When modifying a platform directory, also confirm whether `.trellis/workflow.md` still describes the same flow.
|
|
52
|
-
|
|
53
|
-
## Meaning Of Template Hashes
|
|
54
|
-
|
|
55
|
-
`.trellis/.template-hashes.json` records the content hash from the last time Trellis wrote a template file. `
|
|
56
|
-
|
|
57
|
-
| Case | Update behavior |
|
|
58
|
-
| --- | --- |
|
|
59
|
-
| File was not modified by the user | It can be updated automatically. |
|
|
60
|
-
| File was modified by the user | Prompt the user to overwrite, keep, or generate `.new`. |
|
|
61
|
-
| File is no longer a current template | It may be deleted, renamed, or preserved according to migration rules. |
|
|
62
|
-
|
|
63
|
-
When an AI customizes local Trellis files, it does not need to maintain hashes manually. It is normal for Trellis update to recognize the result as "modified by the user."
|
|
64
|
-
|
|
65
|
-
## Local Customization Boundaries
|
|
66
|
-
|
|
67
|
-
Editable by default:
|
|
68
|
-
|
|
69
|
-
- `.trellis/workflow.md`
|
|
70
|
-
- `.trellis/config.yaml`
|
|
71
|
-
- `.trellis/spec/**`
|
|
72
|
-
- `.trellis/scripts/**`
|
|
73
|
-
- Platform hooks, settings, agents, skills, commands, prompts, and workflows
|
|
74
|
-
|
|
75
|
-
Do not edit by default:
|
|
76
|
-
|
|
77
|
-
- Global npm install directory
|
|
78
|
-
- `node_modules/@blxzer/cursor-trellis`
|
|
79
|
-
- Trellis GitHub repository source code
|
|
80
|
-
- Concrete state files under `.trellis/.runtime/**`
|
|
81
|
-
- Hash contents inside `.trellis/.template-hashes.json`
|
|
82
|
-
|
|
83
|
-
Switch to the Trellis CLI source-code perspective only when the user explicitly wants to contribute upstream.
|
|
1
|
+
# Local Files Generated After Init
|
|
2
|
+
|
|
3
|
+
`cstl init` writes the Trellis runtime into the user project. Later, `cstl update` tries to update Trellis-managed template files, but it uses `.trellis/.template-hashes.json` to determine which files have already been modified by the user.
|
|
4
|
+
|
|
5
|
+
This page only describes files that are visible and editable inside the user project.
|
|
6
|
+
|
|
7
|
+
## `.trellis/`
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
.trellis/
|
|
11
|
+
├── workflow.md
|
|
12
|
+
├── config.yaml
|
|
13
|
+
├── .developer
|
|
14
|
+
├── .version
|
|
15
|
+
├── .template-hashes.json
|
|
16
|
+
├── .runtime/
|
|
17
|
+
├── scripts/
|
|
18
|
+
├── spec/
|
|
19
|
+
├── tasks/
|
|
20
|
+
└── workspace/
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
| Path | Usually editable? | Notes |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| `.trellis/workflow.md` | Yes | Local workflow documentation and AI routing rules. |
|
|
26
|
+
| `.trellis/config.yaml` | Yes | Project configuration, hooks, packages, journal line limits, and related settings. |
|
|
27
|
+
| `.trellis/spec/` | Yes | Project specs, intended to be updated regularly by users and AI. |
|
|
28
|
+
| `.trellis/tasks/` | Yes | Task material and research artifacts, maintained by the task workflow. |
|
|
29
|
+
| `.trellis/workspace/` | Yes | Session records, usually written by `add_session.py`. |
|
|
30
|
+
| `.trellis/scripts/` | Carefully | Local runtime. It can be customized, but only after understanding the call chain. |
|
|
31
|
+
| `.trellis/.runtime/` | No | Runtime state, usually written automatically by hooks/scripts. |
|
|
32
|
+
| `.trellis/.developer` | Carefully | Current developer identity. |
|
|
33
|
+
| `.trellis/.version` | No | Trellis version record used by update/migration logic. |
|
|
34
|
+
| `.trellis/.template-hashes.json` | No | Template hash record. Do not hand-write business rules here. |
|
|
35
|
+
|
|
36
|
+
## Platform Directories
|
|
37
|
+
|
|
38
|
+
On a fresh `cstl init --cursor`, the only platform directory created is `.cursor/`. Trellis previously generated per-platform directories for many AI tools (`.claude/`, `.codex/`, `.opencode/`, etc.); those legacy directories are preserved by `cstl update` but new Trellis behavior ships to `.cursor/` only.
|
|
39
|
+
|
|
40
|
+
Common categories inside `.cursor/`:
|
|
41
|
+
|
|
42
|
+
| Category | Path | Purpose |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| hooks | `.cursor/hooks/` | Hook scripts invoked from `.cursor/hooks.json`. Inject session context, workflow-state, and sub-agent context. |
|
|
45
|
+
| settings/registration | `.cursor/hooks.json` | Registers which scripts run on which Cursor events. |
|
|
46
|
+
| rules | `.cursor/rules/*.mdc` (`alwaysApply: true`) | Per-turn policy prepended before every prompt. |
|
|
47
|
+
| agents | `.cursor/agents/` | Define agents such as `cstl-research`, `cstl-implement`, and `cstl-check`. |
|
|
48
|
+
| skills | `.cursor/skills/` | Skills that auto-trigger or can be read by AI. |
|
|
49
|
+
| commands | `.cursor/commands/` | Legacy compatibility-only user-invoked entry points. |
|
|
50
|
+
|
|
51
|
+
When modifying a platform directory, also confirm whether `.trellis/workflow.md` still describes the same flow.
|
|
52
|
+
|
|
53
|
+
## Meaning Of Template Hashes
|
|
54
|
+
|
|
55
|
+
`.trellis/.template-hashes.json` records the content hash from the last time Trellis wrote a template file. `cstl update` uses it to distinguish three cases:
|
|
56
|
+
|
|
57
|
+
| Case | Update behavior |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| File was not modified by the user | It can be updated automatically. |
|
|
60
|
+
| File was modified by the user | Prompt the user to overwrite, keep, or generate `.new`. |
|
|
61
|
+
| File is no longer a current template | It may be deleted, renamed, or preserved according to migration rules. |
|
|
62
|
+
|
|
63
|
+
When an AI customizes local Trellis files, it does not need to maintain hashes manually. It is normal for Trellis update to recognize the result as "modified by the user."
|
|
64
|
+
|
|
65
|
+
## Local Customization Boundaries
|
|
66
|
+
|
|
67
|
+
Editable by default:
|
|
68
|
+
|
|
69
|
+
- `.trellis/workflow.md`
|
|
70
|
+
- `.trellis/config.yaml`
|
|
71
|
+
- `.trellis/spec/**`
|
|
72
|
+
- `.trellis/scripts/**`
|
|
73
|
+
- Platform hooks, settings, agents, skills, commands, prompts, and workflows
|
|
74
|
+
|
|
75
|
+
Do not edit by default:
|
|
76
|
+
|
|
77
|
+
- Global npm install directory
|
|
78
|
+
- `node_modules/@blxzer/cursor-trellis`
|
|
79
|
+
- Trellis GitHub repository source code
|
|
80
|
+
- Concrete state files under `.trellis/.runtime/**`
|
|
81
|
+
- Hash contents inside `.trellis/.template-hashes.json`
|
|
82
|
+
|
|
83
|
+
Switch to the Trellis CLI source-code perspective only when the user explicitly wants to contribute upstream.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Local Trellis Architecture Overview
|
|
2
2
|
|
|
3
|
-
`
|
|
3
|
+
`cstl-meta` is for user projects that have already run `cstl init`. The user's machine usually has only the npm-installed `cstl` command plus the Trellis files generated inside the project; it may not have the Trellis CLI source code.
|
|
4
4
|
|
|
5
5
|
Therefore, when an AI uses this skill, the default customization target is local files inside the user project:
|
|
6
6
|
|
|
@@ -38,7 +38,7 @@ All three layers live inside the user project, so an AI can read and modify them
|
|
|
38
38
|
1. **Find the local source of truth first**: Do not edit from memory. Read `.trellis/workflow.md`, `.trellis/config.yaml`, the relevant platform directory, and related task files first.
|
|
39
39
|
2. **Edit the user project, not the npm package cache**: Modify generated files inside the project, not `node_modules` or the global npm install directory.
|
|
40
40
|
3. **Keep platform files aligned with `.trellis/`**: If workflow routing changes, also check whether platform skills or commands still describe the same flow.
|
|
41
|
-
4. **Put project-specific rules in `.trellis/spec/` or a local skill**: Do not put team conventions into `
|
|
41
|
+
4. **Put project-specific rules in `.trellis/spec/` or a local skill**: Do not put team conventions into `cstl-meta`.
|
|
42
42
|
5. **Preserve user changes**: If a file was already modified locally, work from the current content instead of overwriting it with a default template.
|
|
43
43
|
|
|
44
44
|
## How To Use This Directory
|
|
@@ -95,7 +95,7 @@ When the AI learns a new rule during implementation or debugging, it should upda
|
|
|
95
95
|
| Change monorepo spec mapping | `packages` / `default_package` / `spec_scope` in `.trellis/config.yaml`. |
|
|
96
96
|
| Change which specs AI reads before implementation | The task's `implement.jsonl`. |
|
|
97
97
|
| Change which specs AI reads during checking | The task's `check.jsonl`. |
|
|
98
|
-
| Change when specs should be updated | Phase 3.3 in `.trellis/workflow.md` and the `
|
|
98
|
+
| Change when specs should be updated | Phase 3.3 in `.trellis/workflow.md` and the `cstl-update-spec` skill. |
|
|
99
99
|
|
|
100
100
|
## Boundaries
|
|
101
101
|
|
|
@@ -73,17 +73,17 @@ python3 ./.trellis/scripts/task.py remove-subtask <parent-dir> <child-dir>
|
|
|
73
73
|
|
|
74
74
|
The AI should not treat phase numbers as task status. Task progress is mainly determined by `status`, artifact presence (`prd.md`, optional `design.md` / `implement.md`), whether JSONL context is configured for sub-agent mode, and the phase descriptions in `workflow.md`.
|
|
75
75
|
|
|
76
|
-
## Selected Task
|
|
77
|
-
|
|
78
|
-
The user sees a "selected task," and Trellis stores that selection per live session.
|
|
79
|
-
|
|
80
|
-
```text
|
|
81
|
-
.trellis/.runtime/sessions/<context-key>.json
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
`task.py select <task>` writes the task path into the runtime session file for the current session. `task.py selected --source` shows the selected task and where it came from. Different AI windows can point to different tasks without overwriting each other.
|
|
85
|
-
|
|
86
|
-
If the platform or shell environment has no stable session identity, `task.py select` may be unable to set the selected task. The AI should read the error, inspect the platform hook/session environment, and not fall back to a shared global pointer.
|
|
76
|
+
## Selected Task
|
|
77
|
+
|
|
78
|
+
The user sees a "selected task," and Trellis stores that selection per live session.
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
.trellis/.runtime/sessions/<context-key>.json
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`task.py select <task>` writes the task path into the runtime session file for the current session. `task.py selected --source` shows the selected task and where it came from. Different AI windows can point to different tasks without overwriting each other.
|
|
85
|
+
|
|
86
|
+
If the platform or shell environment has no stable session identity, `task.py select` may be unable to set the selected task. The AI should read the error, inspect the platform hook/session environment, and not fall back to a shared global pointer.
|
|
87
87
|
|
|
88
88
|
## JSONL Context
|
|
89
89
|
|
|
@@ -106,17 +106,17 @@ Rules:
|
|
|
106
106
|
## Common Commands
|
|
107
107
|
|
|
108
108
|
```bash
|
|
109
|
-
python3 ./.trellis/scripts/task.py create "<title>" --slug <slug>
|
|
110
|
-
python3 ./.trellis/scripts/task.py dashboard
|
|
111
|
-
python3 ./.trellis/scripts/task.py select <task>
|
|
112
|
-
python3 ./.trellis/scripts/task.py selected --source
|
|
113
|
-
python3 ./.trellis/scripts/task.py start-execution <task> --check
|
|
114
|
-
python3 ./.trellis/scripts/task.py start-execution <task> --approved
|
|
115
|
-
python3 ./.trellis/scripts/task.py add-context <task> implement <file> <reason>
|
|
116
|
-
python3 ./.trellis/scripts/task.py validate <task>
|
|
117
|
-
python3 ./.trellis/scripts/task.py exit
|
|
118
|
-
python3 ./.trellis/scripts/task.py archive <task>
|
|
119
|
-
```
|
|
109
|
+
python3 ./.trellis/scripts/task.py create "<title>" --slug <slug>
|
|
110
|
+
python3 ./.trellis/scripts/task.py dashboard
|
|
111
|
+
python3 ./.trellis/scripts/task.py select <task>
|
|
112
|
+
python3 ./.trellis/scripts/task.py selected --source
|
|
113
|
+
python3 ./.trellis/scripts/task.py start-execution <task> --check
|
|
114
|
+
python3 ./.trellis/scripts/task.py start-execution <task> --approved
|
|
115
|
+
python3 ./.trellis/scripts/task.py add-context <task> implement <file> <reason>
|
|
116
|
+
python3 ./.trellis/scripts/task.py validate <task>
|
|
117
|
+
python3 ./.trellis/scripts/task.py exit
|
|
118
|
+
python3 ./.trellis/scripts/task.py archive <task>
|
|
119
|
+
```
|
|
120
120
|
|
|
121
121
|
When modifying the task system, the AI should prefer script commands to maintain structure. Edit JSON/Markdown directly only when scripts do not cover the need.
|
|
122
122
|
|
|
@@ -24,8 +24,8 @@ Each phase contains numbered steps, such as `1.3 Configure context`. These numbe
|
|
|
24
24
|
|
|
25
25
|
`workflow.md` separates routing by platform capability:
|
|
26
26
|
|
|
27
|
-
- Platforms with sub-agent support: dispatch `
|
|
28
|
-
- Platforms without sub-agent support: the main session reads skills such as `
|
|
27
|
+
- Platforms with sub-agent support: dispatch `cstl-implement` by default for implementation and `cstl-check` for checking.
|
|
28
|
+
- Platforms without sub-agent support: the main session reads skills such as `cstl-before-dev`, then executes directly.
|
|
29
29
|
|
|
30
30
|
When changing local AI behavior, update the routing descriptions in `workflow.md` first, then check whether the corresponding platform skill, command, or agent files need to stay in sync.
|
|
31
31
|
|
|
@@ -39,11 +39,11 @@ The bottom of `workflow.md` can contain state blocks like this:
|
|
|
39
39
|
[/workflow-state:no_task]
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
Hooks choose the right block based on selected task status and inject it into the conversation. Common states include:
|
|
42
|
+
Hooks choose the right block based on selected task status and inject it into the conversation. Common states include:
|
|
43
43
|
|
|
44
44
|
| State | Meaning |
|
|
45
45
|
| --- | --- |
|
|
46
|
-
| `no_task` | The current session has no selected task. |
|
|
46
|
+
| `no_task` | The current session has no selected task. |
|
|
47
47
|
| `planning` | The task is still in requirements, research, or context configuration. |
|
|
48
48
|
| `in_progress` | The task has entered implementation and checking. |
|
|
49
49
|
| `completed` | The task is complete and waiting for wrap-up or archive. |
|
|
@@ -68,7 +68,7 @@ After editing, make the AI reread `.trellis/workflow.md`; do not assume the flow
|
|
|
68
68
|
|
|
69
69
|
`workflow.md` is the semantic center of the local workflow, but each platform can also have its own entry files:
|
|
70
70
|
|
|
71
|
-
- skills, such as `
|
|
71
|
+
- skills, such as `cstl-brainstorm` and `cstl-check`.
|
|
72
72
|
- commands/prompts/workflows, such as continue and finish-work.
|
|
73
73
|
- hooks, such as session-start or workflow-state injection.
|
|
74
74
|
|
|
@@ -53,8 +53,8 @@ Planning or review work without a commit can also be recorded by using `--no-com
|
|
|
53
53
|
| `.trellis/workspace/` | Work records across tasks and sessions. |
|
|
54
54
|
| `.trellis/spec/` | Engineering knowledge preserved as long-term conventions. |
|
|
55
55
|
|
|
56
|
-
If information is only useful for the selected task, put it in the task directory.
|
|
57
|
-
If information describes what happened in the current session, put it in the workspace journal.
|
|
56
|
+
If information is only useful for the selected task, put it in the task directory.
|
|
57
|
+
If information describes what happened in the current session, put it in the workspace journal.
|
|
58
58
|
If information should be followed every time code is written in the future, put it in spec.
|
|
59
59
|
|
|
60
60
|
## Local Customization Points
|
|
@@ -68,4 +68,4 @@ If information should be followed every time code is written in the future, put
|
|
|
68
68
|
|
|
69
69
|
## AI Usage Rules
|
|
70
70
|
|
|
71
|
-
The AI should not treat workspace as the only source of truth. When resuming a task, read the selected task first, then use workspace for background. After a task is complete, record important process notes in workspace; if long-term rules emerged, update spec.
|
|
71
|
+
The AI should not treat workspace as the only source of truth. When resuming a task, read the selected task first, then use workspace for background. After a task is complete, record important process notes in workspace; if long-term rules emerged, update spec.
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Trellis agent files define specialized roles. Common Trellis agents in a user project are:
|
|
4
4
|
|
|
5
|
-
- `
|
|
6
|
-
- `
|
|
7
|
-
- `
|
|
5
|
+
- `cstl-research`
|
|
6
|
+
- `cstl-implement`
|
|
7
|
+
- `cstl-check`
|
|
8
8
|
|
|
9
9
|
Responsibility boundaries should stay consistent regardless of file format.
|
|
10
10
|
|
|
@@ -14,9 +14,9 @@ Responsibility boundaries should stay consistent regardless of file format.
|
|
|
14
14
|
|
|
15
15
|
| Agent | Responsibility |
|
|
16
16
|
| --- | --- |
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
17
|
+
| `cstl-research` | Investigate the question and write findings into the selected task's `research/`. |
|
|
18
|
+
| `cstl-implement` | Implement against `prd.md`, optional `design.md` / `implement.md`, `implement.jsonl`, and related spec/research. |
|
|
19
|
+
| `cstl-check` | Review changes, fix discovered issues, and run necessary checks. |
|
|
20
20
|
|
|
21
21
|
Agent files should not become generic chat prompts. They should define input sources, write boundaries, whether code may be changed, and how results are reported.
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ Agent files should not become generic chat prompts. They should define input sou
|
|
|
24
24
|
|
|
25
25
|
| Platform | Agent path |
|
|
26
26
|
| --- | --- |
|
|
27
|
-
| Cursor | `.cursor/agents/
|
|
27
|
+
| Cursor | `.cursor/agents/cstl-*.md` |
|
|
28
28
|
|
|
29
29
|
Agent files are dispatched via the Cursor Task tool, opened as Agent sessions, or invoked inline as Skill forms depending on the entry point. See `cursor-subagent-policy.md.txt` for the full entry-point matrix and Method 1–2.6 model dispatch strategy.
|
|
30
30
|
|
|
@@ -51,9 +51,9 @@ This mode fits cases where the hook cannot reliably rewrite the sub-agent prompt
|
|
|
51
51
|
|
|
52
52
|
| User need | Edit location |
|
|
53
53
|
| --- | --- |
|
|
54
|
-
| Implement agent must follow extra restrictions | `.cursor/agents/
|
|
55
|
-
| Check agent must run project-specific commands | `.cursor/agents/
|
|
56
|
-
| Research agent must output a fixed format | `.cursor/agents/
|
|
54
|
+
| Implement agent must follow extra restrictions | `.cursor/agents/cstl-implement.md`. |
|
|
55
|
+
| Check agent must run project-specific commands | `.cursor/agents/cstl-check.md`, and `.trellis/spec/` if needed. |
|
|
56
|
+
| Research agent must output a fixed format | `.cursor/agents/cstl-research.md`. |
|
|
57
57
|
| Agent cannot read task context | Agent prelude in the agent file, or the `inject-subagent-context` hook registration in `.cursor/hooks.json`. |
|
|
58
58
|
| Add a project-specific agent | `.cursor/agents/` + related skill/command entry point that invokes it. |
|
|
59
59
|
|
|
@@ -62,7 +62,7 @@ This mode fits cases where the hook cannot reliably rewrite the sub-agent prompt
|
|
|
62
62
|
1. **Keep responsibilities single-purpose**. Do not mix research, implement, and check responsibilities into one agent.
|
|
63
63
|
2. **Specify the read order**. Agents must know to start from the selected task, read jsonl/spec context, then read `prd.md`, `design.md` if present, and `implement.md` if present.
|
|
64
64
|
3. **Specify write boundaries**. Research usually only writes `research/`; implement can write code; check can fix issues.
|
|
65
|
-
4. **Treat dogfood + published copies consistently**. `.cursor/agents/
|
|
65
|
+
4. **Treat dogfood + published copies consistently**. `.cursor/agents/cstl-*.md` (dogfooded) and `packages/cli/src/templates/cursor/agents/cstl-*.md` (published template) must stay in sync — see `cross-layer-thinking-guide.md.txt` → Cross-Package Template Consistency.
|
|
66
66
|
|
|
67
67
|
## Do Not Default To Editing Upstream Templates
|
|
68
68
|
|
|
@@ -13,7 +13,7 @@ Hooks/settings are the entry layer that connects Cursor to Trellis. They decide
|
|
|
13
13
|
|
|
14
14
|
> Trellis previously shipped settings/config files for many platforms (`.claude/settings.json`, `.codex/hooks.json`, `.gemini/settings.json`, etc.). The project has converged on **Cursor-only**. New Trellis features ship into `.cursor/hooks.json` + `.cursor/hooks/`.
|
|
15
15
|
|
|
16
|
-
Whether legacy settings/config files exist in a project depends on which historical `
|
|
16
|
+
Whether legacy settings/config files exist in a project depends on which historical `cstl init --<platform>` flags the user previously ran; `cstl update` preserves them.
|
|
17
17
|
|
|
18
18
|
| Platform | settings/config |
|
|
19
19
|
| --- | --- |
|
|
@@ -9,7 +9,7 @@ When a local AI modifies Trellis, it should distinguish two file categories firs
|
|
|
9
9
|
|
|
10
10
|
Platform files do not store business state. They let Cursor read Trellis state, call Trellis scripts, and load Trellis skills/agents/hooks.
|
|
11
11
|
|
|
12
|
-
> **Historical note**: Trellis previously shipped adapter directories for many AI tools (`.claude/`, `.codex/`, `.opencode/`, etc.). The project has converged on **Cursor-only**. Legacy adapter directories may still exist in upgraded projects (`
|
|
12
|
+
> **Historical note**: Trellis previously shipped adapter directories for many AI tools (`.claude/`, `.codex/`, `.opencode/`, etc.). The project has converged on **Cursor-only**. Legacy adapter directories may still exist in upgraded projects (`cstl update` preserves user files), but new framework/runtime behavior targets Cursor exclusively.
|
|
13
13
|
|
|
14
14
|
## Platform File Categories (Cursor)
|
|
15
15
|
|
|
@@ -18,16 +18,16 @@ Platform files do not store business state. They let Cursor read Trellis state,
|
|
|
18
18
|
| settings/config | `.cursor/hooks.json` | Register hooks and platform behavior. |
|
|
19
19
|
| hooks | `.cursor/hooks/` | Inject context at session start, pre-tool-use on Task/Subagent, before-shell-execution, and stop events. |
|
|
20
20
|
| rules | `.cursor/rules/*.mdc` (`alwaysApply: true`) | Per-turn policy prepended before every prompt (e.g. Request Triage, retrieval routing). See `cursor-context-injection-guide.md.txt` for the channel-reliability matrix. |
|
|
21
|
-
| agents | `.cursor/agents/` | Define `
|
|
21
|
+
| agents | `.cursor/agents/` | Define `cstl-research`, `cstl-implement`, and `cstl-check` for Task / Agent-session dispatch. |
|
|
22
22
|
| skills | `.cursor/skills/` | Capability descriptions that auto-trigger or can be read on demand. |
|
|
23
|
-
| commands | `.cursor/commands/` | User-invocable `/slash` entry points (e.g. `
|
|
23
|
+
| commands | `.cursor/commands/` | User-invocable `/slash` entry points (e.g. `cstl-continue`, `record-session`). |
|
|
24
24
|
|
|
25
25
|
## Cursor Integration Mode
|
|
26
26
|
|
|
27
27
|
Cursor combines three integration styles:
|
|
28
28
|
|
|
29
29
|
1. **Hook / Extension Driven** — `.cursor/hooks.json` + `.cursor/hooks/` fire on sessionStart, pre-tool-use on Task/Subagent, beforeShellExecution, and stop. Common capabilities: session-start Task Dashboard + Phase Index injection (note the `additional_context` Cursor bug #158452 — use `.cursor/rules` or `AGENTS.md` for must-always-be-visible content), PRD/jsonl injection when sub-agents start, shell commands inheriting session identity.
|
|
30
|
-
2. **Agent Prelude / Pull-Based** — `.cursor/agents/*.md` instruct each custom Task subagent to read the selected task, PRD, and JSONL context after startup (the `<!--
|
|
30
|
+
2. **Agent Prelude / Pull-Based** — `.cursor/agents/*.md` instruct each custom Task subagent to read the selected task, PRD, and JSONL context after startup (the `<!-- cstl-hook-injected -->` marker confirms injected context).
|
|
31
31
|
3. **Main-Session Workflow** — `.cursor/commands/*.md` and `.cursor/skills/*.md` guide the main-session AI to read files, run scripts, and move tasks forward; `.cursor/rules/*.mdc` enforce per-turn policy.
|
|
32
32
|
|
|
33
33
|
To change "when the AI knows what," inspect `.cursor/hooks.json` and `.cursor/rules/` first. To change how sub-agents load context, inspect `.cursor/agents/`. To change user-invocable entry points, inspect `.cursor/commands/` and `.cursor/skills/`.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This page lists Trellis file locations in a user project on **Cursor**.
|
|
4
4
|
|
|
5
|
-
Trellis originally supported multiple AI platforms (Claude Code, Codex, OpenCode, Kilo, Kiro, Gemini, Antigravity, Windsurf, Qoder, CodeBuddy, GitHub Copilot, Factory Droid, Pi Agent). The project has since converged on **Cursor-only**. Legacy adapter directories may still exist in upgraded projects (`
|
|
5
|
+
Trellis originally supported multiple AI platforms (Claude Code, Codex, OpenCode, Kilo, Kiro, Gemini, Antigravity, Windsurf, Qoder, CodeBuddy, GitHub Copilot, Factory Droid, Pi Agent). The project has since converged on **Cursor-only**. Legacy adapter directories may still exist in upgraded projects (`cstl update` preserves user files), but new framework/runtime behavior targets Cursor exclusively.
|
|
6
6
|
|
|
7
7
|
## Matrix
|
|
8
8
|
|
|
@@ -13,8 +13,8 @@ Trellis originally supported multiple AI platforms (Claude Code, Codex, OpenCode
|
|
|
13
13
|
## Capability Reference (Cursor)
|
|
14
14
|
|
|
15
15
|
- **Skills** auto-trigger via the workflow matcher and can be read on demand. They live in `.cursor/skills/`.
|
|
16
|
-
- **Agents** (`
|
|
17
|
-
- **Commands** (e.g. `record-session`, `
|
|
16
|
+
- **Agents** (`cstl-research`, `cstl-implement`, `cstl-check`) live in `.cursor/agents/` and are dispatched via the Task tool or opened as Agent sessions / Skill forms depending on the entry point (see `cursor-subagent-policy.md.txt`).
|
|
17
|
+
- **Commands** (e.g. `record-session`, `cstl-continue`) live in `.cursor/commands/` and are user-invocable via `/slash`.
|
|
18
18
|
- **Hooks** (session start, pre-tool-use on Task/Subagent, before-shell-execution, stop) are registered in `.cursor/hooks.json` and their handler scripts live in `.cursor/hooks/`.
|
|
19
19
|
- **Project rules** (always-applied policy) live in `.cursor/rules/*.mdc`.
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ Trellis originally supported multiple AI platforms (Claude Code, Codex, OpenCode
|
|
|
22
22
|
|
|
23
23
|
1. User specified a platform other than Cursor: treat as a legacy adapter inspection — preserve existing files but do not extend new behavior there.
|
|
24
24
|
2. User says "all platforms should do this": in Cursor-only world this is equivalent to "modify the Cursor path"; also mirror any dogfooded copy under `.cursor/` in `packages/cli/src/templates/cursor/` if applicable.
|
|
25
|
-
3. User only says "my AI": inspect which directories actually exist in the project; on a fresh `
|
|
25
|
+
3. User only says "my AI": inspect which directories actually exist in the project; on a fresh `cstl init` only `.cursor/` and `.trellis/` are created.
|
|
26
26
|
4. User wants project rules: prefer `.trellis/spec/` or a project-local skill under `.cursor/skills/`.
|
|
27
27
|
5. User wants Trellis behavior: edit `.trellis/workflow.md` plus `.cursor/hooks.json` / `.cursor/agents/` / `.cursor/skills/` / `.cursor/commands/`.
|
|
28
28
|
|
|
@@ -40,6 +40,6 @@ Do not delete a custom file just because it is not listed in this path table.
|
|
|
40
40
|
|
|
41
41
|
If a user project still contains legacy platform directories (e.g. `.claude/`, `.codex/`, `.opencode/`):
|
|
42
42
|
|
|
43
|
-
- `
|
|
43
|
+
- `cstl update` preserves them; do not delete on sight.
|
|
44
44
|
- If the user asks to clean them up, suggest removing the unused platform directories after confirming they are not shared with another tool.
|
|
45
45
|
- Do not register new hooks/agents/skills/commands under legacy platform directories. New Trellis features ship to `.cursor/` only.
|
|
@@ -16,19 +16,19 @@ Skills and commands are textual entry points for user interaction with Trellis.
|
|
|
16
16
|
Trellis has two skill families:
|
|
17
17
|
|
|
18
18
|
- Workflow skills: `brainstorm`, `before-dev`, `check`, `update-spec`, and `break-loop`.
|
|
19
|
-
- Multi-file bundled skills include `
|
|
19
|
+
- Multi-file bundled skills include `cstl-meta`, `cstl-spec-bootstrap`, `cstl-skill-creator`, `smart-search-cli`, `cstl-micro-grill`, and `cstl-cursor2plus-setup`.
|
|
20
20
|
|
|
21
|
-
Bundled skills are installed as directories and may include nested `agents/`, `examples/`, `references/`, or other lazy-loadable files. Do not describe bundled skills as a closed `
|
|
21
|
+
Bundled skills are installed as directories and may include nested `agents/`, `examples/`, `references/`, or other lazy-loadable files. Do not describe bundled skills as a closed `cstl-*` list: `smart-search-cli` intentionally keeps its existing non-`cstl-` name.
|
|
22
22
|
|
|
23
23
|
`smart-search-cli` is CLI-backed source retrieval. The Trellis package exposes the `smart-search` executable through its runtime wrapper; the skill documents how agents should use that CLI and cite retrieved sources.
|
|
24
24
|
|
|
25
|
-
`
|
|
25
|
+
`cstl-spec-bootstrap` bootstraps project-specific `.trellis/spec/` guidance from the real repository.
|
|
26
26
|
|
|
27
|
-
`
|
|
27
|
+
`cstl-skill-creator` is the authoring and review guide for Trellis-compatible skills. Use it when creating or improving project-local skills under `.cursor/skills/`, the shared `.agents/skills/` directory (industry skill-sharing, kept but not extended by new Trellis behavior), or upstream bundled skills. Keep `cstl-meta` focused on architecture and routing.
|
|
28
28
|
|
|
29
|
-
`
|
|
29
|
+
`cstl-micro-grill` is the Trellis clarification adapter. It asks one high-value question at a time and escalates to Lite, Full, or Parent/Child task modes only when durable artifacts or broader risk require it.
|
|
30
30
|
|
|
31
|
-
`
|
|
31
|
+
`cstl-cursor2plus-setup` guides Cursor++ BYOK users through `trellis-task-models.json5` (primary/fallback per Task role), `patch_wpelc8.py`, and Reload Window. Use after `cstl init --cursor` or when `providers.json` changes.
|
|
32
32
|
|
|
33
33
|
## Common Paths (Cursor)
|
|
34
34
|
|
|
@@ -36,20 +36,20 @@ Bundled skills are installed as directories and may include nested `agents/`, `e
|
|
|
36
36
|
| --- | --- |
|
|
37
37
|
| Cursor | `.cursor/skills/` (preferred); `.cursor/commands/` is legacy compatibility-only |
|
|
38
38
|
|
|
39
|
-
In a user project, use the files actually generated by init as authoritative. On current Cursor, Trellis prefers Agent Skills for manual entrypoints such as `
|
|
39
|
+
In a user project, use the files actually generated by init as authoritative. On current Cursor, Trellis prefers Agent Skills for manual entrypoints such as `cstl-continue` and `cstl-finish-work`; legacy `.cursor/commands/` files may exist in older projects but should be treated as an explicit compatibility surface rather than the default current-platform command surface.
|
|
40
40
|
|
|
41
41
|
## Skill Structure
|
|
42
42
|
|
|
43
43
|
A common skill is a directory:
|
|
44
44
|
|
|
45
45
|
```text
|
|
46
|
-
|
|
46
|
+
cstl-meta/
|
|
47
47
|
├── SKILL.md
|
|
48
48
|
└── references/
|
|
49
|
-
|
|
49
|
+
cstl-spec-bootstrap/
|
|
50
50
|
├── SKILL.md
|
|
51
51
|
└── references/
|
|
52
|
-
|
|
52
|
+
cstl-skill-creator/
|
|
53
53
|
├── SKILL.md
|
|
54
54
|
└── references/
|
|
55
55
|
smart-search-cli/
|
|
@@ -57,9 +57,9 @@ smart-search-cli/
|
|
|
57
57
|
├── agents/
|
|
58
58
|
├── examples/
|
|
59
59
|
└── references/
|
|
60
|
-
|
|
60
|
+
cstl-micro-grill/
|
|
61
61
|
└── SKILL.md
|
|
62
|
-
|
|
62
|
+
cstl-cursor2plus-setup/
|
|
63
63
|
└── SKILL.md
|
|
64
64
|
```
|
|
65
65
|
|
|
@@ -100,13 +100,13 @@ Do not reintroduce `task.py start`, `task.py current`, or `task.py finish` into
|
|
|
100
100
|
| Change AI auto-trigger rules | The corresponding skill's frontmatter description. |
|
|
101
101
|
| Change user command behavior | The corresponding command/prompt/workflow file. |
|
|
102
102
|
| Add a project-local skill | `.cursor/skills/` (or `.agents/skills/` only when explicitly sharing with another non-Trellis tool that reads that path). |
|
|
103
|
-
| Change finish/continue entry points | On current Cursor, prefer `.cursor/skills/
|
|
103
|
+
| Change finish/continue entry points | On current Cursor, prefer `.cursor/skills/cstl-continue` and `.cursor/skills/cstl-finish-work` over legacy `.cursor/commands/`. |
|
|
104
104
|
|
|
105
105
|
## Modification Principles
|
|
106
106
|
|
|
107
|
-
1. **Keep entry files short; references carry long content**. This matters especially for multi-file skills like `
|
|
107
|
+
1. **Keep entry files short; references carry long content**. This matters especially for multi-file skills like `cstl-meta` and `cstl-skill-creator`.
|
|
108
108
|
2. **Make trigger descriptions specific**. A description that is too broad can mis-trigger; one that is too narrow may not trigger.
|
|
109
109
|
3. **Keep behavior descriptions consistent with the shared `.trellis/` runtime**. Format may differ per file type, but semantics should match the shared workflow.
|
|
110
|
-
4. **Put project-specific capabilities in local skills**. Do not put team-private flows into public `
|
|
110
|
+
4. **Put project-specific capabilities in local skills**. Do not put team-private flows into public `cstl-meta`.
|
|
111
111
|
|
|
112
112
|
If the user only wants local AI to know one more project rule, usually create a project-local skill under `.cursor/skills/` or update `.trellis/spec/` instead of changing a Trellis built-in workflow skill.
|