@blxzer/cursor-trellis 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -5
- package/README.zh-CN.md +170 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1 -33
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +0 -13
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +7 -14
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +3 -32
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +7 -84
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/index.d.ts +7 -8
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +11 -236
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +5 -1
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/migrations/manifests/0.1.1.json +9 -0
- package/dist/migrations/manifests/0.1.2.json +9 -0
- package/dist/templates/common/bundled-skills/smart-search-cli/SKILL.md +3 -3
- package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +4 -2
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +8 -15
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-hooks.md +7 -7
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +18 -21
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +2 -2
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +10 -7
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/overview.md +4 -4
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +20 -31
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/hooks-and-settings.md +20 -31
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/overview.md +24 -40
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md +28 -59
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +12 -28
- package/dist/templates/common/bundled-skills/trellis-skill-creator/references/trellis-skill-locations.md +2 -2
- package/dist/templates/cursor/hooks.json +6 -0
- package/dist/templates/cursor/rules/retrieval-routing.mdc +57 -0
- package/dist/templates/extract.d.ts +0 -14
- package/dist/templates/extract.d.ts.map +1 -1
- package/dist/templates/extract.js +0 -34
- package/dist/templates/extract.js.map +1 -1
- package/dist/templates/markdown/agents.md +2 -6
- package/dist/templates/markdown/index.d.ts +1 -0
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +1 -0
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/markdown/prompts/run-semantic-slice-12.md.txt +41 -0
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +14 -14
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +8 -20
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +15 -14
- package/dist/templates/markdown/spec/guides/cursor-context-injection-guide.md.txt +4 -2
- package/dist/templates/markdown/spec/guides/cursor-semantic-compliance.md.txt +49 -0
- package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +18 -5
- package/dist/templates/markdown/spec/guides/retrieval-daily-guide.md.txt +68 -20
- package/dist/templates/shared-hooks/index.d.ts +1 -1
- package/dist/templates/shared-hooks/index.d.ts.map +1 -1
- package/dist/templates/shared-hooks/index.js +1 -0
- package/dist/templates/shared-hooks/index.js.map +1 -1
- package/dist/templates/shared-hooks/inject-retrieval-plan.py +163 -0
- package/dist/templates/shared-hooks/inject-subagent-context.py +31 -567
- package/dist/templates/shared-hooks/research-end-retrieval-pack.py +2 -11
- package/dist/templates/trellis/index.d.ts +12 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +24 -0
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/aggregate_retrieval_telemetry.py +342 -0
- package/dist/templates/trellis/scripts/batch_plan_envelope.py +105 -0
- package/dist/templates/trellis/scripts/codegraph_session_smoke.py +76 -0
- package/dist/templates/trellis/scripts/common/active_task.py +116 -147
- package/dist/templates/trellis/scripts/common/cli_adapter.py +34 -710
- package/dist/templates/trellis/scripts/common/codebase_retrieval_router.py +49 -106
- package/dist/templates/trellis/scripts/common/git_context.py +17 -2
- package/dist/templates/trellis/scripts/common/project_file_stats.py +91 -0
- package/dist/templates/trellis/scripts/common/retrieval_adapter_metadata.py +9 -11
- package/dist/templates/trellis/scripts/common/retrieval_agent_instructions.py +313 -0
- package/dist/templates/trellis/scripts/common/retrieval_pack.py +0 -6
- package/dist/templates/trellis/scripts/common/retrieval_pack_context.py +0 -4
- package/dist/templates/trellis/scripts/common/retrieval_plan_gate.py +76 -0
- package/dist/templates/trellis/scripts/common/retrieval_result_ranking.py +253 -0
- package/dist/templates/trellis/scripts/common/retrieval_tool_classification.py +157 -0
- package/dist/templates/trellis/scripts/common/semantic_plan_gate.py +52 -0
- package/dist/templates/trellis/scripts/common/subagent_dispatch.py +527 -0
- package/dist/templates/trellis/scripts/common/task_store.py +32 -0
- package/dist/templates/trellis/scripts/common/workflow_phase.py +3 -24
- package/dist/templates/trellis/scripts/rank_retrieval_candidates.py +80 -0
- package/dist/templates/trellis/scripts/route_codebase_retrieval.py +38 -11
- package/dist/templates/trellis/scripts/score_evidence.py +112 -0
- package/dist/templates/trellis/scripts/task.py +26 -0
- package/dist/templates/trellis/workflow.md +844 -960
- package/dist/types/ai-tools.d.ts +13 -16
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +5 -238
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/utils/codebase-retrieval-router.d.ts +1 -8
- package/dist/utils/codebase-retrieval-router.d.ts.map +1 -1
- package/dist/utils/codebase-retrieval-router.js +39 -180
- package/dist/utils/codebase-retrieval-router.js.map +1 -1
- package/dist/utils/project-capabilities.d.ts.map +1 -1
- package/dist/utils/project-capabilities.js +10 -24
- package/dist/utils/project-capabilities.js.map +1 -1
- package/dist/utils/retrieval-agent-instructions.d.ts +14 -0
- package/dist/utils/retrieval-agent-instructions.d.ts.map +1 -0
- package/dist/utils/retrieval-agent-instructions.js +221 -0
- package/dist/utils/retrieval-agent-instructions.js.map +1 -0
- package/dist/utils/retrieval-execution-telemetry.d.ts +43 -85
- package/dist/utils/retrieval-execution-telemetry.d.ts.map +1 -1
- package/dist/utils/retrieval-execution-telemetry.js +289 -22
- package/dist/utils/retrieval-execution-telemetry.js.map +1 -1
- package/dist/utils/retrieval-result-ranking.js +1 -1
- package/dist/utils/retrieval-result-ranking.js.map +1 -1
- package/dist/utils/retrieval-tool-classification.d.ts +32 -0
- package/dist/utils/retrieval-tool-classification.d.ts.map +1 -0
- package/dist/utils/retrieval-tool-classification.js +113 -0
- package/dist/utils/retrieval-tool-classification.js.map +1 -0
- package/dist/utils/uninstall-scrubbers.d.ts +0 -36
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
- package/dist/utils/uninstall-scrubbers.js +0 -184
- package/dist/utils/uninstall-scrubbers.js.map +1 -1
- package/package.json +4 -2
- package/dist/commands/mem.d.ts +0 -30
- package/dist/commands/mem.d.ts.map +0 -1
- package/dist/commands/mem.js +0 -424
- package/dist/commands/mem.js.map +0 -1
- package/dist/configurators/antigravity.d.ts +0 -7
- package/dist/configurators/antigravity.d.ts.map +0 -1
- package/dist/configurators/antigravity.js +0 -19
- package/dist/configurators/antigravity.js.map +0 -1
- package/dist/configurators/claude.d.ts +0 -9
- package/dist/configurators/claude.d.ts.map +0 -1
- package/dist/configurators/claude.js +0 -72
- package/dist/configurators/claude.js.map +0 -1
- package/dist/configurators/codebuddy.d.ts +0 -10
- package/dist/configurators/codebuddy.d.ts.map +0 -1
- package/dist/configurators/codebuddy.js +0 -30
- package/dist/configurators/codebuddy.js.map +0 -1
- package/dist/configurators/codex.d.ts +0 -8
- package/dist/configurators/codex.d.ts.map +0 -1
- package/dist/configurators/codex.js +0 -87
- package/dist/configurators/codex.js.map +0 -1
- package/dist/configurators/copilot.d.ts +0 -10
- package/dist/configurators/copilot.d.ts.map +0 -1
- package/dist/configurators/copilot.js +0 -51
- package/dist/configurators/copilot.js.map +0 -1
- package/dist/configurators/droid.d.ts +0 -10
- package/dist/configurators/droid.d.ts.map +0 -1
- package/dist/configurators/droid.js +0 -30
- package/dist/configurators/droid.js.map +0 -1
- package/dist/configurators/gemini.d.ts +0 -16
- package/dist/configurators/gemini.d.ts.map +0 -1
- package/dist/configurators/gemini.js +0 -38
- package/dist/configurators/gemini.js.map +0 -1
- package/dist/configurators/kilo.d.ts +0 -7
- package/dist/configurators/kilo.d.ts.map +0 -1
- package/dist/configurators/kilo.js +0 -19
- package/dist/configurators/kilo.js.map +0 -1
- package/dist/configurators/kiro.d.ts +0 -8
- package/dist/configurators/kiro.d.ts.map +0 -1
- package/dist/configurators/kiro.js +0 -24
- package/dist/configurators/kiro.js.map +0 -1
- package/dist/configurators/opencode.d.ts +0 -14
- package/dist/configurators/opencode.d.ts.map +0 -1
- package/dist/configurators/opencode.js +0 -96
- package/dist/configurators/opencode.js.map +0 -1
- package/dist/configurators/pi.d.ts +0 -3
- package/dist/configurators/pi.d.ts.map +0 -1
- package/dist/configurators/pi.js +0 -45
- package/dist/configurators/pi.js.map +0 -1
- package/dist/configurators/qoder.d.ts +0 -11
- package/dist/configurators/qoder.d.ts.map +0 -1
- package/dist/configurators/qoder.js +0 -31
- package/dist/configurators/qoder.js.map +0 -1
- package/dist/configurators/windsurf.d.ts +0 -7
- package/dist/configurators/windsurf.d.ts.map +0 -1
- package/dist/configurators/windsurf.js +0 -19
- package/dist/configurators/windsurf.js.map +0 -1
- package/dist/templates/claude/agents/trellis-check.md +0 -124
- package/dist/templates/claude/agents/trellis-implement.md +0 -110
- package/dist/templates/claude/agents/trellis-research.md +0 -137
- package/dist/templates/claude/index.d.ts +0 -22
- package/dist/templates/claude/index.d.ts.map +0 -1
- package/dist/templates/claude/index.js +0 -46
- package/dist/templates/claude/index.js.map +0 -1
- package/dist/templates/claude/settings.json +0 -84
- package/dist/templates/codebuddy/agents/trellis-check.md +0 -115
- package/dist/templates/codebuddy/agents/trellis-implement.md +0 -110
- package/dist/templates/codebuddy/agents/trellis-research.md +0 -137
- package/dist/templates/codebuddy/index.d.ts +0 -15
- package/dist/templates/codebuddy/index.d.ts.map +0 -1
- package/dist/templates/codebuddy/index.js +0 -15
- package/dist/templates/codebuddy/index.js.map +0 -1
- package/dist/templates/codebuddy/settings.json +0 -70
- package/dist/templates/codex/agents/trellis-check.toml +0 -67
- package/dist/templates/codex/agents/trellis-implement.toml +0 -40
- package/dist/templates/codex/agents/trellis-research.toml +0 -73
- package/dist/templates/codex/config.toml +0 -28
- package/dist/templates/codex/hooks/session-start.py +0 -575
- package/dist/templates/codex/hooks.json +0 -15
- package/dist/templates/codex/index.d.ts +0 -39
- package/dist/templates/codex/index.d.ts.map +0 -1
- package/dist/templates/codex/index.js +0 -85
- package/dist/templates/codex/index.js.map +0 -1
- package/dist/templates/codex/skills/before-dev/SKILL.md +0 -40
- package/dist/templates/codex/skills/brainstorm/SKILL.md +0 -112
- package/dist/templates/codex/skills/break-loop/SKILL.md +0 -130
- package/dist/templates/codex/skills/check/SKILL.md +0 -98
- package/dist/templates/codex/skills/check-cross-layer/SKILL.md +0 -158
- package/dist/templates/codex/skills/create-command/SKILL.md +0 -101
- package/dist/templates/codex/skills/finish-work/SKILL.md +0 -90
- package/dist/templates/codex/skills/improve-ut/SKILL.md +0 -69
- package/dist/templates/codex/skills/integrate-skill/SKILL.md +0 -221
- package/dist/templates/codex/skills/onboard/SKILL.md +0 -363
- package/dist/templates/codex/skills/record-session/SKILL.md +0 -67
- package/dist/templates/codex/skills/start/SKILL.md +0 -66
- package/dist/templates/codex/skills/update-spec/SKILL.md +0 -335
- package/dist/templates/copilot/hooks/session-start.py +0 -557
- package/dist/templates/copilot/hooks.json +0 -19
- package/dist/templates/copilot/index.d.ts +0 -23
- package/dist/templates/copilot/index.d.ts.map +0 -1
- package/dist/templates/copilot/index.js +0 -54
- package/dist/templates/copilot/index.js.map +0 -1
- package/dist/templates/copilot/prompts/before-dev.prompt.md +0 -39
- package/dist/templates/copilot/prompts/brainstorm.prompt.md +0 -111
- package/dist/templates/copilot/prompts/break-loop.prompt.md +0 -129
- package/dist/templates/copilot/prompts/check-cross-layer.prompt.md +0 -157
- package/dist/templates/copilot/prompts/check.prompt.md +0 -97
- package/dist/templates/copilot/prompts/create-command.prompt.md +0 -116
- package/dist/templates/copilot/prompts/finish-work.prompt.md +0 -99
- package/dist/templates/copilot/prompts/integrate-skill.prompt.md +0 -223
- package/dist/templates/copilot/prompts/onboard.prompt.md +0 -362
- package/dist/templates/copilot/prompts/parallel.prompt.md +0 -204
- package/dist/templates/copilot/prompts/record-session.prompt.md +0 -66
- package/dist/templates/copilot/prompts/start.prompt.md +0 -63
- package/dist/templates/copilot/prompts/update-spec.prompt.md +0 -358
- package/dist/templates/droid/droids/trellis-check.md +0 -107
- package/dist/templates/droid/droids/trellis-implement.md +0 -102
- package/dist/templates/droid/droids/trellis-research.md +0 -137
- package/dist/templates/droid/index.d.ts +0 -15
- package/dist/templates/droid/index.d.ts.map +0 -1
- package/dist/templates/droid/index.js +0 -15
- package/dist/templates/droid/index.js.map +0 -1
- package/dist/templates/droid/settings.json +0 -70
- package/dist/templates/gemini/agents/trellis-check.md +0 -107
- package/dist/templates/gemini/agents/trellis-implement.md +0 -102
- package/dist/templates/gemini/agents/trellis-research.md +0 -136
- package/dist/templates/gemini/index.d.ts +0 -13
- package/dist/templates/gemini/index.d.ts.map +0 -1
- package/dist/templates/gemini/index.js +0 -13
- package/dist/templates/gemini/index.js.map +0 -1
- package/dist/templates/gemini/settings.json +0 -28
- package/dist/templates/kiro/agents/trellis-check.json +0 -26
- package/dist/templates/kiro/agents/trellis-implement.json +0 -26
- package/dist/templates/kiro/agents/trellis-research.json +0 -30
- package/dist/templates/kiro/index.d.ts +0 -18
- package/dist/templates/kiro/index.d.ts.map +0 -1
- package/dist/templates/kiro/index.js +0 -18
- package/dist/templates/kiro/index.js.map +0 -1
- package/dist/templates/opencode/agents/trellis-check.md +0 -122
- package/dist/templates/opencode/agents/trellis-implement.md +0 -118
- package/dist/templates/opencode/agents/trellis-research.md +0 -145
- package/dist/templates/opencode/lib/session-utils.js +0 -667
- package/dist/templates/opencode/lib/trellis-context.js +0 -336
- package/dist/templates/opencode/package.json +0 -5
- package/dist/templates/opencode/plugins/inject-subagent-context.js +0 -495
- package/dist/templates/opencode/plugins/inject-workflow-state.js +0 -159
- package/dist/templates/opencode/plugins/session-start.js +0 -101
- package/dist/templates/pi/agents/trellis-check.md +0 -37
- package/dist/templates/pi/agents/trellis-implement.md +0 -42
- package/dist/templates/pi/agents/trellis-research.md +0 -25
- package/dist/templates/pi/extensions/trellis/index.ts.txt +0 -1600
- package/dist/templates/pi/index.d.ts +0 -5
- package/dist/templates/pi/index.d.ts.map +0 -1
- package/dist/templates/pi/index.js +0 -12
- package/dist/templates/pi/index.js.map +0 -1
- package/dist/templates/pi/settings.json +0 -12
- package/dist/templates/qoder/agents/trellis-check.md +0 -108
- package/dist/templates/qoder/agents/trellis-implement.md +0 -103
- package/dist/templates/qoder/agents/trellis-research.md +0 -137
- package/dist/templates/qoder/index.d.ts +0 -15
- package/dist/templates/qoder/index.d.ts.map +0 -1
- package/dist/templates/qoder/index.js +0 -15
- package/dist/templates/qoder/index.js.map +0 -1
- package/dist/templates/qoder/settings.json +0 -47
|
@@ -35,15 +35,18 @@ This page only describes files that are visible and editable inside the user pro
|
|
|
35
35
|
|
|
36
36
|
## Platform Directories
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
On a fresh `trellis 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 `trellis update` but new Trellis behavior ships to `.cursor/` only.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Common categories inside `.cursor/`:
|
|
41
|
+
|
|
42
|
+
| Category | Path | Purpose |
|
|
41
43
|
| --- | --- | --- |
|
|
42
|
-
| hooks | `.
|
|
43
|
-
| settings | `.
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
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 `trellis-research`, `trellis-implement`, and `trellis-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. |
|
|
47
50
|
|
|
48
51
|
When modifying a platform directory, also confirm whether `.trellis/workflow.md` still describes the same flow.
|
|
49
52
|
|
package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/overview.md
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
Therefore, when an AI uses this skill, the default customization target is local files inside the user project:
|
|
6
6
|
|
|
7
7
|
- `.trellis/`: workflow, tasks, specs, memory, scripts, and runtime state.
|
|
8
|
-
- Platform
|
|
9
|
-
- Shared skill layer: `.agents/skills
|
|
8
|
+
- Platform directory: `.cursor/` — skills, agents, hooks, commands, rules.
|
|
9
|
+
- Shared skill layer: `.agents/skills/` (industry skill-sharing path; kept when present but not extended by new Trellis behavior).
|
|
10
10
|
|
|
11
11
|
Do not default to guiding the user to fork the Trellis CLI repository. Treat upstream source code as the operating target only when the user explicitly says they want to change Trellis upstream source, publish an npm package, or contribute a PR.
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ All three layers live inside the user project, so an AI can read and modify them
|
|
|
30
30
|
| `.trellis/tasks/` | Each task's PRD, technical notes, research files, and JSONL context. |
|
|
31
31
|
| `.trellis/workspace/` | Per-developer journals and cross-session memory. |
|
|
32
32
|
| `.trellis/scripts/` | Local Python runtime used by commands, hooks, and context injection. |
|
|
33
|
-
| `.trellis/.runtime/` | Session-level runtime state, such as the selected task pointer. |
|
|
33
|
+
| `.trellis/.runtime/` | Session-level runtime state, such as the selected task pointer. |
|
|
34
34
|
| `.trellis/.template-hashes.json` | Template hashes for Trellis-managed files, used by update to determine whether local files were modified by the user. |
|
|
35
35
|
|
|
36
36
|
## AI Customization Principles
|
|
@@ -45,7 +45,7 @@ All three layers live inside the user project, so an AI can read and modify them
|
|
|
45
45
|
|
|
46
46
|
- To understand which files exist after init, read `generated-files.md`.
|
|
47
47
|
- To change phases, routing, or next actions, read `workflow.md`.
|
|
48
|
-
- To change the task model, JSONL context, or selected task behavior, read `task-system.md`.
|
|
48
|
+
- To change the task model, JSONL context, or selected task behavior, read `task-system.md`.
|
|
49
49
|
- To change coding convention injection, read `spec-system.md`.
|
|
50
50
|
- To understand journals and cross-session memory, read `workspace-memory.md`.
|
|
51
51
|
- To change hooks or sub-agent context loading, read `context-injection.md`.
|
package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md
CHANGED
|
@@ -6,75 +6,64 @@ Trellis agent files define specialized roles. Common Trellis agents in a user pr
|
|
|
6
6
|
- `trellis-implement`
|
|
7
7
|
- `trellis-check`
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Responsibility boundaries should stay consistent regardless of file format.
|
|
10
|
+
|
|
11
|
+
> Trellis previously shipped agent files in per-platform directories for many AI tools (`.claude/agents/`, `.codex/agents/`, `.kiro/agents/`, etc.). The project has converged on **Cursor-only**. New agent definitions ship into `.cursor/agents/`; legacy agent directories in upgraded projects are preserved but not extended.
|
|
10
12
|
|
|
11
13
|
## Agent Responsibilities
|
|
12
14
|
|
|
13
15
|
| Agent | Responsibility |
|
|
14
16
|
| --- | --- |
|
|
15
|
-
| `trellis-research` | Investigate the question and write findings into the selected task's `research/`. |
|
|
17
|
+
| `trellis-research` | Investigate the question and write findings into the selected task's `research/`. |
|
|
16
18
|
| `trellis-implement` | Implement against `prd.md`, optional `design.md` / `implement.md`, `implement.jsonl`, and related spec/research. |
|
|
17
19
|
| `trellis-check` | Review changes, fix discovered issues, and run necessary checks. |
|
|
18
20
|
|
|
19
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.
|
|
20
22
|
|
|
21
|
-
## Common Paths
|
|
23
|
+
## Common Paths (Cursor)
|
|
22
24
|
|
|
23
25
|
| Platform | Agent path |
|
|
24
26
|
| --- | --- |
|
|
25
|
-
| Claude Code | `.claude/agents/trellis-*.md` |
|
|
26
27
|
| Cursor | `.cursor/agents/trellis-*.md` |
|
|
27
|
-
| OpenCode | `.opencode/agents/trellis-*.md` |
|
|
28
|
-
| Codex | `.codex/agents/trellis-*.toml` |
|
|
29
|
-
| Kiro | `.kiro/agents/trellis-*.json` |
|
|
30
|
-
| Gemini CLI | `.gemini/agents/trellis-*.md` |
|
|
31
|
-
| Qoder | `.qoder/agents/trellis-*.md` |
|
|
32
|
-
| CodeBuddy | `.codebuddy/agents/trellis-*.md` |
|
|
33
|
-
| Factory Droid | `.factory/droids/trellis-*.md` |
|
|
34
|
-
| Pi Agent | `.pi/agents/trellis-*.md` |
|
|
35
|
-
|
|
36
|
-
GitHub Copilot agent/prompt support is provided by a combination of directories such as `.github/agents/`, `.github/prompts/`, and `.github/skills/`; inspect the files actually generated in the user project.
|
|
37
28
|
|
|
38
|
-
|
|
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.
|
|
39
30
|
|
|
40
31
|
## Two Context Loading Modes
|
|
41
32
|
|
|
42
33
|
### hook push
|
|
43
34
|
|
|
44
|
-
The
|
|
45
|
-
|
|
46
|
-
Common on platforms that support agent hooks.
|
|
35
|
+
The Cursor hook (`inject-subagent-context.py`, registered in `.cursor/hooks.json`) injects task context before the agent starts. The agent file itself can focus more on responsibilities and boundaries.
|
|
47
36
|
|
|
48
37
|
### agent pull
|
|
49
38
|
|
|
50
39
|
The agent file instructs the agent to read after startup:
|
|
51
40
|
|
|
52
|
-
- `python3 ./.trellis/scripts/task.py selected --source`
|
|
53
|
-
- `implement.jsonl` or `check.jsonl`
|
|
54
|
-
- spec/research files referenced by JSONL
|
|
55
|
-
- selected task `prd.md`
|
|
41
|
+
- `python3 ./.trellis/scripts/task.py selected --source`
|
|
42
|
+
- `implement.jsonl` or `check.jsonl`
|
|
43
|
+
- spec/research files referenced by JSONL
|
|
44
|
+
- selected task `prd.md`
|
|
56
45
|
- `design.md` if present
|
|
57
46
|
- `implement.md` if present
|
|
58
47
|
|
|
59
|
-
This mode fits
|
|
48
|
+
This mode fits cases where the hook cannot reliably rewrite the sub-agent prompt or the entry point is an Agent session that bypasses the Task hook path.
|
|
60
49
|
|
|
61
50
|
## Local Change Scenarios
|
|
62
51
|
|
|
63
52
|
| User need | Edit location |
|
|
64
53
|
| --- | --- |
|
|
65
|
-
| Implement agent must follow extra restrictions |
|
|
66
|
-
| Check agent must run project-specific commands |
|
|
67
|
-
| Research agent must output a fixed format |
|
|
68
|
-
| Agent cannot read task context | Agent prelude or `inject-subagent-context` hook. |
|
|
69
|
-
| Add a project-specific agent |
|
|
54
|
+
| Implement agent must follow extra restrictions | `.cursor/agents/trellis-implement.md`. |
|
|
55
|
+
| Check agent must run project-specific commands | `.cursor/agents/trellis-check.md`, and `.trellis/spec/` if needed. |
|
|
56
|
+
| Research agent must output a fixed format | `.cursor/agents/trellis-research.md`. |
|
|
57
|
+
| Agent cannot read task context | Agent prelude in the agent file, or the `inject-subagent-context` hook registration in `.cursor/hooks.json`. |
|
|
58
|
+
| Add a project-specific agent | `.cursor/agents/` + related skill/command entry point that invokes it. |
|
|
70
59
|
|
|
71
60
|
## Modification Principles
|
|
72
61
|
|
|
73
62
|
1. **Keep responsibilities single-purpose**. Do not mix research, implement, and check responsibilities into one agent.
|
|
74
|
-
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.
|
|
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.
|
|
75
64
|
3. **Specify write boundaries**. Research usually only writes `research/`; implement can write code; check can fix issues.
|
|
76
|
-
4. **
|
|
65
|
+
4. **Treat dogfood + published copies consistently**. `.cursor/agents/trellis-*.md` (dogfooded) and `packages/cli/src/templates/cursor/agents/trellis-*.md` (published template) must stay in sync — see `cross-layer-thinking-guide.md.txt` → Cross-Package Template Consistency.
|
|
77
66
|
|
|
78
67
|
## Do Not Default To Editing Upstream Templates
|
|
79
68
|
|
|
80
|
-
Local AI should default to modifying
|
|
69
|
+
Local AI should default to modifying agent files inside the user project's `.cursor/agents/`. Discuss upstream template source (`packages/cli/src/templates/cursor/agents/`) only when the user explicitly wants to contribute the change back to Trellis.
|
|
@@ -1,60 +1,49 @@
|
|
|
1
1
|
# Hooks And Settings
|
|
2
2
|
|
|
3
|
-
Hooks/settings are the entry layer that connects
|
|
3
|
+
Hooks/settings are the entry layer that connects Cursor to Trellis. They decide which scripts run on which Cursor events.
|
|
4
4
|
|
|
5
5
|
## Settings Responsibilities
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
`.cursor/hooks.json` registers:
|
|
8
8
|
|
|
9
|
-
- session-start hook: injects a Trellis overview when a new session starts or context resets.
|
|
10
|
-
- workflow-state hook: parses `[workflow-state:STATUS]` blocks from `.trellis/workflow.md` and emits the body matching the selected task `status` on each user input. Parser-only; the script does not embed fallback content.
|
|
9
|
+
- session-start hook: injects a Trellis overview when a new session starts or context resets (note the Cursor `additional_context` bug #158452 — see `cursor-context-injection-guide.md.txt`).
|
|
10
|
+
- workflow-state hook: parses `[workflow-state:STATUS]` blocks from `.trellis/workflow.md` and emits the body matching the selected task `status` on each user input. Parser-only; the script does not embed fallback content.
|
|
11
11
|
- sub-agent context hook: injects task context when implementation/check/research agents start.
|
|
12
12
|
- shell/session bridge: lets shell commands see the same Trellis session identity.
|
|
13
|
-
- platform plugin or extension entry points.
|
|
14
13
|
|
|
15
|
-
|
|
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
|
+
|
|
16
|
+
Whether legacy settings/config files exist in a project depends on which historical `trellis init --<platform>` flags the user previously ran; `trellis update` preserves them.
|
|
16
17
|
|
|
17
18
|
| Platform | settings/config |
|
|
18
19
|
| --- | --- |
|
|
19
|
-
| Claude Code | `.claude/settings.json` |
|
|
20
20
|
| Cursor | `.cursor/hooks.json` |
|
|
21
|
-
| Codex | `.codex/hooks.json`, `.codex/config.toml` |
|
|
22
|
-
| OpenCode | `.opencode/package.json`, `.opencode/plugins/*` |
|
|
23
|
-
| Kiro | `.kiro/hooks/` + platform config |
|
|
24
|
-
| Gemini CLI | `.gemini/settings.json` |
|
|
25
|
-
| Qoder | `.qoder/settings.json` |
|
|
26
|
-
| CodeBuddy | `.codebuddy/settings.json` |
|
|
27
|
-
| GitHub Copilot | `.github/copilot/hooks.json` |
|
|
28
|
-
| Factory Droid | `.factory/settings.json` |
|
|
29
|
-
| Pi Agent | `.pi/settings.json`, `.pi/extensions/trellis/` |
|
|
30
|
-
|
|
31
|
-
Whether these files exist in a project depends on which `trellis init --<platform>` flags the user ran.
|
|
32
21
|
|
|
33
22
|
## Hook Script Types
|
|
34
23
|
|
|
35
24
|
| Script | Purpose |
|
|
36
25
|
| --- | --- |
|
|
37
26
|
| `session-start.py` | Generates session-start context. |
|
|
38
|
-
| `inject-workflow-state.py` | Parses `[workflow-state:STATUS]` blocks in `.trellis/workflow.md` and emits the body matching the selected task status. Falls back to `Refer to workflow.md for current step.` when no matching block exists. |
|
|
27
|
+
| `inject-workflow-state.py` | Parses `[workflow-state:STATUS]` blocks in `.trellis/workflow.md` and emits the body matching the selected task status. Falls back to `Refer to workflow.md for current step.` when no matching block exists. |
|
|
39
28
|
| `inject-subagent-context.py` | Injects PRD, JSONL context, and related spec/research into sub-agents. |
|
|
40
29
|
| `inject-shell-session-context.py` | Lets shell commands inherit Trellis session identity. |
|
|
41
30
|
|
|
42
|
-
|
|
31
|
+
Cursor exposes sessionStart, preToolUse on Task/Subagent, beforeShellExecution, and stop events. Confirm against the current Cursor release before wiring a new event name; the available event surface has evolved over time and historical platform documentation may be stale.
|
|
43
32
|
|
|
44
33
|
## Local Change Scenarios
|
|
45
34
|
|
|
46
35
|
| User need | Edit location |
|
|
47
36
|
| --- | --- |
|
|
48
|
-
| AI should see more/less context in a new session |
|
|
37
|
+
| AI should see more/less context in a new session | `.cursor/hooks.json` → `session-start` hook (or `.cursor/rules/*.mdc` for content the model must see every turn — see `cursor-context-injection-guide.md.txt`). |
|
|
49
38
|
| Per-turn hint policy should change | `[workflow-state:STATUS]` block in `.trellis/workflow.md`. The hook parses workflow.md verbatim — no script edit required. |
|
|
50
|
-
| Sub-agent cannot read PRD/spec | `inject-subagent-context` hook or agent prelude
|
|
51
|
-
| `task.py selected` in shell has no selected task |
|
|
52
|
-
| Disable an automatic injection | The corresponding hook registration in
|
|
39
|
+
| Sub-agent cannot read PRD/spec | `inject-subagent-context.py` hook or agent prelude in `.cursor/agents/*.md`. |
|
|
40
|
+
| `task.py selected` in shell has no selected task | `inject-shell-session-context.py` hook or environment-variable configuration. |
|
|
41
|
+
| Disable an automatic injection | The corresponding hook registration in `.cursor/hooks.json`. |
|
|
53
42
|
|
|
54
43
|
## Modification Principles
|
|
55
44
|
|
|
56
|
-
1. **Settings wire things up; hooks define behavior**. If only the hook changes,
|
|
57
|
-
2. **Confirm
|
|
45
|
+
1. **Settings wire things up; hooks define behavior**. If only the hook changes, Cursor may never call it. If only settings change, behavior may not change.
|
|
46
|
+
2. **Confirm Cursor event names first**. Cursor's hook event surface has changed between releases; what an older guide calls `UserPromptSubmit` may now be modeled by `beforeSubmitPrompt` instead.
|
|
58
47
|
3. **Hooks read local `.trellis/`, not upstream source**. `.trellis/scripts/` and `.trellis/workflow.md` in the user project are the default targets.
|
|
59
48
|
4. **Errors must be visible**. Hook failures should tell the user what was not injected instead of silently leaving the AI without context.
|
|
60
49
|
|
|
@@ -62,8 +51,8 @@ Not every platform has every hook. Do not copy files from another platform just
|
|
|
62
51
|
|
|
63
52
|
If the user says "AI did not read Trellis state":
|
|
64
53
|
|
|
65
|
-
1. Check whether
|
|
66
|
-
2. Check whether the hook file exists
|
|
67
|
-
3. Manually run the `.trellis/scripts/get_context.py` or `task.py selected --source` command that the hook depends on.
|
|
68
|
-
4. Check whether selected task state exists in `.trellis/.runtime/sessions/`.
|
|
69
|
-
5. Check whether the
|
|
54
|
+
1. Check whether `.cursor/hooks.json` registers the hook.
|
|
55
|
+
2. Check whether the hook file exists under `.cursor/hooks/`.
|
|
56
|
+
3. Manually run the `.trellis/scripts/get_context.py` or `task.py selected --source` command that the hook depends on.
|
|
57
|
+
4. Check whether selected task state exists in `.trellis/.runtime/sessions/`.
|
|
58
|
+
5. Check whether the Cursor shell passes session identity.
|
package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/overview.md
CHANGED
|
@@ -1,60 +1,44 @@
|
|
|
1
1
|
# Platform Files Overview
|
|
2
2
|
|
|
3
|
-
Trellis connects the same local architecture to
|
|
3
|
+
Trellis connects the same local architecture to **Cursor**. `.trellis/` stores the shared runtime; `.cursor/` stores adapter files that define how Cursor enters Trellis.
|
|
4
4
|
|
|
5
|
-
When a local AI modifies Trellis, it should distinguish two file categories first:
|
|
6
|
-
|
|
7
|
-
- **Shared files**: `.trellis/workflow.md`, `.trellis/tasks/`, `.trellis/spec/`, `.trellis/scripts/`.
|
|
8
|
-
- **Platform files**: first-class `.claude/`, `.codex/`, `.cursor/`; legacy adapter directories such as `.opencode/`, `.kiro/`, `.gemini/`, `.qoder/`, `.codebuddy/`, `.github/`, `.factory/`, `.pi/`, `.kilocode/`, `.agent/`, `.windsurf/`, and similar directories.
|
|
9
|
-
|
|
10
|
-
Platform files do not store business state. They let the corresponding AI tool read Trellis state, call Trellis scripts, and load Trellis skills/agents/hooks.
|
|
11
|
-
|
|
12
|
-
This fork actively targets Claude Code, Codex, and Cursor as first-class platform surfaces. Other adapter directories may still exist when explicitly selected or already configured, but new workflow/runtime behavior should not assume they are equally verified without a dedicated compatibility pass.
|
|
5
|
+
When a local AI modifies Trellis, it should distinguish two file categories first:
|
|
13
6
|
|
|
14
|
-
|
|
7
|
+
- **Shared files**: `.trellis/workflow.md`, `.trellis/tasks/`, `.trellis/spec/`, `.trellis/scripts/`.
|
|
8
|
+
- **Platform files**: `.cursor/` (settings, hooks, agents, skills, commands, rules).
|
|
15
9
|
|
|
16
|
-
|
|
17
|
-
| --- | --- | --- |
|
|
18
|
-
| settings/config | `.claude/settings.json`, `.codex/hooks.json`, `.qoder/settings.json` | Register hooks, plugins, extensions, or platform behavior. |
|
|
19
|
-
| hooks/plugins/extensions | `.claude/hooks/`, `.opencode/plugins/`, `.pi/extensions/` | Inject context at session start, user input, agent startup, shell execution, and similar events. |
|
|
20
|
-
| agents | `.claude/agents/`, `.codex/agents/`, `.kiro/agents/` | Define `trellis-research`, `trellis-implement`, and `trellis-check`. |
|
|
21
|
-
| skills | `.claude/skills/`, `.agents/skills/`, `.qoder/skills/` | Capability descriptions that auto-trigger or can be read on demand. |
|
|
22
|
-
| commands/prompts/workflows | `.cursor/commands/`, `.github/prompts/`, `.windsurf/workflows/` | Entry points explicitly invoked by the user. |
|
|
23
|
-
|
|
24
|
-
## Three Platform Integration Modes
|
|
25
|
-
|
|
26
|
-
### 1. Hook / Extension Driven
|
|
27
|
-
|
|
28
|
-
These platforms can trigger scripts or plugins on specific events and actively inject Trellis context into AI.
|
|
10
|
+
Platform files do not store business state. They let Cursor read Trellis state, call Trellis scripts, and load Trellis skills/agents/hooks.
|
|
29
11
|
|
|
30
|
-
|
|
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 (`trellis update` preserves user files), but new framework/runtime behavior targets Cursor exclusively.
|
|
31
13
|
|
|
32
|
-
|
|
33
|
-
- workflow-state hints for each user turn.
|
|
34
|
-
- PRD/spec/research injection when sub-agents start.
|
|
35
|
-
- Shell commands inheriting session identity.
|
|
14
|
+
## Platform File Categories (Cursor)
|
|
36
15
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
16
|
+
| Category | Common paths | Purpose |
|
|
17
|
+
| --- | --- | --- |
|
|
18
|
+
| settings/config | `.cursor/hooks.json` | Register hooks and platform behavior. |
|
|
19
|
+
| hooks | `.cursor/hooks/` | Inject context at session start, pre-tool-use on Task/Subagent, before-shell-execution, and stop events. |
|
|
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 `trellis-research`, `trellis-implement`, and `trellis-check` for Task / Agent-session dispatch. |
|
|
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. `trellis-continue`, `record-session`). |
|
|
42
24
|
|
|
43
|
-
|
|
25
|
+
## Cursor Integration Mode
|
|
44
26
|
|
|
45
|
-
|
|
27
|
+
Cursor combines three integration styles:
|
|
46
28
|
|
|
47
|
-
|
|
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 `<!-- trellis-hook-injected -->` marker confirms injected context).
|
|
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.
|
|
48
32
|
|
|
49
|
-
To change
|
|
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/`.
|
|
50
34
|
|
|
51
35
|
## Local Modification Order
|
|
52
36
|
|
|
53
|
-
When the user asks to customize behavior
|
|
37
|
+
When the user asks to customize behavior:
|
|
54
38
|
|
|
55
39
|
1. Read `.trellis/workflow.md` to confirm the shared flow.
|
|
56
|
-
2. Read
|
|
57
|
-
3. Read the
|
|
40
|
+
2. Read `.cursor/hooks.json` to see which hooks are registered.
|
|
41
|
+
3. Read the relevant `.cursor/agents/*.md`, `.cursor/skills/*/SKILL.md`, `.cursor/commands/*.md`, and `.cursor/rules/*.mdc`.
|
|
58
42
|
4. Modify the local file closest to the user's need.
|
|
59
43
|
5. If the change affects the shared flow, synchronize `.trellis/workflow.md` or `.trellis/spec/`.
|
|
60
44
|
|
package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md
CHANGED
|
@@ -1,76 +1,45 @@
|
|
|
1
1
|
# Platform File Map
|
|
2
2
|
|
|
3
|
-
This page lists
|
|
4
|
-
|
|
5
|
-
This fork's first-class platform surfaces are Claude Code, Codex, and Cursor. Other rows are legacy adapters: keep them working when explicitly configured, but do not treat them as equal targets for new framework/runtime behavior without a compatibility pass.
|
|
3
|
+
This page lists Trellis file locations in a user project on **Cursor**.
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
| Platform | Tier | CLI flag | Main directory | Skill directory | Agent directory | Hooks/extensions |
|
|
10
|
-
| --- | --- | --- | --- | --- | --- | --- |
|
|
11
|
-
| Claude Code | First-class | `--claude` | `.claude/` | `.claude/skills/` | `.claude/agents/` | `.claude/hooks/` + `.claude/settings.json` |
|
|
12
|
-
| Cursor | First-class | `--cursor` | `.cursor/` | `.cursor/skills/` | `.cursor/agents/` | `.cursor/hooks.json` + `.cursor/hooks/` |
|
|
13
|
-
| Codex | First-class | `--codex` | `.codex/` | `.agents/skills/` | `.codex/agents/` | `.codex/hooks/` + `.codex/hooks.json` |
|
|
14
|
-
| OpenCode | Legacy adapter | `--opencode` | `.opencode/` | `.opencode/skills/` | `.opencode/agents/` | `.opencode/plugins/` |
|
|
15
|
-
| Kilo | Legacy adapter | `--kilo` | `.kilocode/` | `.kilocode/skills/` | Usually none | `.kilocode/workflows/` |
|
|
16
|
-
| Kiro | Legacy adapter | `--kiro` | `.kiro/` | `.kiro/skills/` | `.kiro/agents/` | `.kiro/hooks/` |
|
|
17
|
-
| Gemini CLI | Legacy adapter | `--gemini` | `.gemini/` | `.agents/skills/` | `.gemini/agents/` | `.gemini/settings.json` + `.gemini/hooks/` |
|
|
18
|
-
| Antigravity | Legacy adapter | `--antigravity` | `.agent/` | `.agent/skills/` | Usually none | `.agent/workflows/` |
|
|
19
|
-
| Windsurf | Legacy adapter | `--windsurf` | `.windsurf/` | `.windsurf/skills/` | Usually none | `.windsurf/workflows/` |
|
|
20
|
-
| Qoder | Legacy adapter | `--qoder` | `.qoder/` | `.qoder/skills/` | `.qoder/agents/` | `.qoder/hooks/` + `.qoder/settings.json` |
|
|
21
|
-
| CodeBuddy | Legacy adapter | `--codebuddy` | `.codebuddy/` | `.codebuddy/skills/` | `.codebuddy/agents/` | `.codebuddy/hooks/` + `.codebuddy/settings.json` |
|
|
22
|
-
| GitHub Copilot | Legacy adapter | `--copilot` | `.github/` | `.github/skills/` | `.github/agents/` | `.github/copilot/hooks/` + prompts |
|
|
23
|
-
| Factory Droid | Legacy adapter | `--droid` | `.factory/` | `.factory/skills/` | `.factory/droids/` | `.factory/hooks/` + settings |
|
|
24
|
-
| Pi Agent | Legacy adapter | `--pi` | `.pi/` | `.pi/skills/` | `.pi/agents/` | `.pi/extensions/trellis/` + `.pi/settings.json` |
|
|
25
|
-
|
|
26
|
-
## Capability Groups
|
|
27
|
-
|
|
28
|
-
### Trellis Sub-Agent Support
|
|
29
|
-
|
|
30
|
-
These platforms usually have `trellis-research`, `trellis-implement`, and `trellis-check` files:
|
|
31
|
-
|
|
32
|
-
- Claude Code
|
|
33
|
-
- Cursor
|
|
34
|
-
- OpenCode
|
|
35
|
-
- Codex
|
|
36
|
-
- Kiro
|
|
37
|
-
- Gemini CLI
|
|
38
|
-
- Qoder
|
|
39
|
-
- CodeBuddy
|
|
40
|
-
- GitHub Copilot
|
|
41
|
-
- Factory Droid
|
|
42
|
-
- Pi Agent
|
|
43
|
-
|
|
44
|
-
When changing implementation/check/research behavior, look for the corresponding platform agent files first.
|
|
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 (`trellis update` preserves user files), but new framework/runtime behavior targets Cursor exclusively.
|
|
45
6
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
These platforms rely more on workflows/skills to guide the main session:
|
|
49
|
-
|
|
50
|
-
- Kilo
|
|
51
|
-
- Antigravity
|
|
52
|
-
- Windsurf
|
|
7
|
+
## Matrix
|
|
53
8
|
|
|
54
|
-
|
|
9
|
+
| Platform | CLI flag | Main directory | Skill directory | Agent directory | Hooks/extensions |
|
|
10
|
+
| --- | --- | --- | --- | --- | --- |
|
|
11
|
+
| Cursor | `--cursor` | `.cursor/` | `.cursor/skills/` | `.cursor/agents/` | `.cursor/hooks.json` + `.cursor/hooks/` |
|
|
55
12
|
|
|
56
|
-
|
|
13
|
+
## Capability Reference (Cursor)
|
|
57
14
|
|
|
58
|
-
|
|
15
|
+
- **Skills** auto-trigger via the workflow matcher and can be read on demand. They live in `.cursor/skills/`.
|
|
16
|
+
- **Agents** (`trellis-research`, `trellis-implement`, `trellis-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`, `trellis-continue`) live in `.cursor/commands/` and are user-invocable via `/slash`.
|
|
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
|
+
- **Project rules** (always-applied policy) live in `.cursor/rules/*.mdc`.
|
|
59
20
|
|
|
60
21
|
## Decision Rules When Modifying Platform Files
|
|
61
22
|
|
|
62
|
-
1. User specified a platform:
|
|
63
|
-
2. User says "all platforms should do this":
|
|
64
|
-
3. User only says "my AI": inspect
|
|
65
|
-
4. User wants project rules: prefer `.trellis/spec/` or a project-local skill
|
|
66
|
-
5. User wants Trellis behavior: edit `.trellis/workflow.md` plus
|
|
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
|
+
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 `trellis init` only `.cursor/` and `.trellis/` are created.
|
|
26
|
+
4. User wants project rules: prefer `.trellis/spec/` or a project-local skill under `.cursor/skills/`.
|
|
27
|
+
5. User wants Trellis behavior: edit `.trellis/workflow.md` plus `.cursor/hooks.json` / `.cursor/agents/` / `.cursor/skills/` / `.cursor/commands/`.
|
|
67
28
|
|
|
68
29
|
## When Paths Differ
|
|
69
30
|
|
|
70
|
-
|
|
31
|
+
Cursor's layout can change between versions, and user projects may already be customized. If this table disagrees with local files, use the actual settings/config in the user project as authoritative:
|
|
71
32
|
|
|
72
|
-
- Check the hook that
|
|
73
|
-
- Check the script that a command/
|
|
33
|
+
- Check the hook that `.cursor/hooks.json` registers.
|
|
34
|
+
- Check the script that a command/agent points to.
|
|
74
35
|
- Judge behavior by the read rules currently written in the agent file.
|
|
75
36
|
|
|
76
37
|
Do not delete a custom file just because it is not listed in this path table.
|
|
38
|
+
|
|
39
|
+
## Legacy Adapter Handling
|
|
40
|
+
|
|
41
|
+
If a user project still contains legacy platform directories (e.g. `.claude/`, `.codex/`, `.opencode/`):
|
|
42
|
+
|
|
43
|
+
- `trellis update` preserves them; do not delete on sight.
|
|
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
|
+
- Do not register new hooks/agents/skills/commands under legacy platform directories. New Trellis features ship to `.cursor/` only.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Skills, Commands, Prompts, And Workflows
|
|
2
2
|
|
|
3
|
-
Skills and commands are textual entry points for user interaction with Trellis.
|
|
3
|
+
Skills and commands are textual entry points for user interaction with Trellis. They tell the AI how to enter the Trellis flow when the user expresses a certain intent.
|
|
4
4
|
|
|
5
5
|
## Conceptual Differences
|
|
6
6
|
|
|
@@ -11,6 +11,8 @@ Skills and commands are textual entry points for user interaction with Trellis.
|
|
|
11
11
|
| prompt | Explicit user invocation or platform selection | Similar to command, but in a platform prompt format. |
|
|
12
12
|
| workflow | Explicit user selection or platform auto-match | Guides the main session when no sub-agent/hook exists. |
|
|
13
13
|
|
|
14
|
+
> Trellis previously shipped per-platform skill/command directories for many AI tools. The project has converged on **Cursor-only**. New skills and commands ship into `.cursor/`; legacy adapter directories in upgraded projects are preserved but not extended.
|
|
15
|
+
|
|
14
16
|
Trellis has two skill families:
|
|
15
17
|
|
|
16
18
|
- Workflow skills: `brainstorm`, `before-dev`, `check`, `update-spec`, and `break-loop`.
|
|
@@ -22,36 +24,19 @@ Bundled skills are installed as directories and may include nested `agents/`, `e
|
|
|
22
24
|
|
|
23
25
|
`trellis-spec-bootstrap` bootstraps project-specific `.trellis/spec/` guidance from the real repository.
|
|
24
26
|
|
|
25
|
-
`trellis-skill-creator` is the authoring and review guide for Trellis-compatible skills. Use it when creating or improving project-local skills
|
|
27
|
+
`trellis-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 `trellis-meta` focused on architecture and routing.
|
|
26
28
|
|
|
27
29
|
`trellis-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.
|
|
28
30
|
|
|
29
|
-
`trellis-cursor2plus-setup` guides Cursor++ BYOK users through `trellis-task-models.json5` (primary/fallback per Task role), `patch_wpelc8.py`, and Reload Window. Use after `trellis init`
|
|
31
|
+
`trellis-cursor2plus-setup` guides Cursor++ BYOK users through `trellis-task-models.json5` (primary/fallback per Task role), `patch_wpelc8.py`, and Reload Window. Use after `trellis init --cursor` or when `providers.json` changes.
|
|
30
32
|
|
|
31
|
-
## Common Paths
|
|
33
|
+
## Common Paths (Cursor)
|
|
32
34
|
|
|
33
35
|
| Platform | Common entries |
|
|
34
36
|
| --- | --- |
|
|
35
|
-
| Claude Code | `.claude/skills/`, `.claude/commands/` |
|
|
36
37
|
| Cursor | `.cursor/skills/` (preferred); `.cursor/commands/` is legacy compatibility-only |
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
| Kilo | `.kilocode/skills/`, `.kilocode/workflows/` |
|
|
40
|
-
| Kiro | `.kiro/skills/` |
|
|
41
|
-
| Gemini CLI | `.agents/skills/`, `.gemini/commands/` |
|
|
42
|
-
| Antigravity | `.agent/skills/`, `.agent/workflows/` |
|
|
43
|
-
| Windsurf | `.windsurf/skills/`, `.windsurf/workflows/` |
|
|
44
|
-
| Qoder | `.qoder/skills/`, `.qoder/commands/` |
|
|
45
|
-
| CodeBuddy | `.codebuddy/skills/`, `.codebuddy/commands/` |
|
|
46
|
-
| GitHub Copilot | `.github/skills/`, `.github/prompts/` |
|
|
47
|
-
| Factory Droid | `.factory/skills/`, `.factory/commands/` |
|
|
48
|
-
| Pi Agent | `.pi/skills/` |
|
|
49
|
-
|
|
50
|
-
In a user project, use the files actually generated by init as authoritative.
|
|
51
|
-
On current Cursor, Trellis prefers Agent Skills for manual entrypoints such as
|
|
52
|
-
`trellis-continue` and `trellis-finish-work`; legacy `.cursor/commands` files
|
|
53
|
-
may exist in older projects but should be treated as an explicit compatibility
|
|
54
|
-
surface rather than the default current-platform command surface.
|
|
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 `trellis-continue` and `trellis-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.
|
|
55
40
|
|
|
56
41
|
## Skill Structure
|
|
57
42
|
|
|
@@ -114,15 +99,14 @@ Do not reintroduce `task.py start`, `task.py current`, or `task.py finish` into
|
|
|
114
99
|
| --- | --- |
|
|
115
100
|
| Change AI auto-trigger rules | The corresponding skill's frontmatter description. |
|
|
116
101
|
| Change user command behavior | The corresponding command/prompt/workflow file. |
|
|
117
|
-
| Add a project-local skill |
|
|
118
|
-
|
|
|
119
|
-
| Change finish/continue entry points | Platform commands/prompts/workflows; on current Cursor, prefer `.cursor/skills/trellis-continue` and `.cursor/skills/trellis-finish-work` over legacy `.cursor/commands`. |
|
|
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/trellis-continue` and `.cursor/skills/trellis-finish-work` over legacy `.cursor/commands/`. |
|
|
120
104
|
|
|
121
105
|
## Modification Principles
|
|
122
106
|
|
|
123
107
|
1. **Keep entry files short; references carry long content**. This matters especially for multi-file skills like `trellis-meta` and `trellis-skill-creator`.
|
|
124
108
|
2. **Make trigger descriptions specific**. A description that is too broad can mis-trigger; one that is too narrow may not trigger.
|
|
125
|
-
3. **Keep
|
|
109
|
+
3. **Keep behavior descriptions consistent with the shared `.trellis/` runtime**. Format may differ per file type, but semantics should match the shared workflow.
|
|
126
110
|
4. **Put project-specific capabilities in local skills**. Do not put team-private flows into public `trellis-meta`.
|
|
127
111
|
|
|
128
|
-
If the user only wants local AI to know one more project rule, usually create a project-local skill or update `.trellis/spec/` instead of changing a Trellis built-in workflow skill.
|
|
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.
|
|
@@ -6,8 +6,8 @@ Choose the target directory before writing content. Local files are authoritativ
|
|
|
6
6
|
|
|
7
7
|
| User goal | Default location | Notes |
|
|
8
8
|
| --- | --- | --- |
|
|
9
|
-
| Add a skill for one Trellis project
|
|
10
|
-
| Add a skill
|
|
9
|
+
| Add a skill for one Trellis project on Cursor | `.cursor/skills/<skill-name>/` | Default target — Trellis is Cursor-only. |
|
|
10
|
+
| Add a skill shared across tools that read the agentskills.io convention | `.agents/skills/<skill-name>/` | Use only when explicitly sharing with a non-Trellis tool that reads the shared agentskills layer. New Trellis behavior stays in `.cursor/skills/`. |
|
|
11
11
|
| Change an existing local Trellis skill | The existing skill directory in the user's project | Preserve local customizations and read the current `SKILL.md` first. |
|
|
12
12
|
| Add a public Trellis bundled skill | `packages/cli/src/templates/common/bundled-skills/<skill-name>/` | Only when working in the Trellis source repository. Update tests that assert bundled skill installation and template tracking. |
|
|
13
13
|
| Add a personal cross-project skill | User's configured global skills directory | Requires explicit user approval because it changes global behavior outside the project. |
|
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
"timeout": 30
|
|
15
15
|
}
|
|
16
16
|
],
|
|
17
|
+
"beforeSubmitPrompt": [
|
|
18
|
+
{
|
|
19
|
+
"command": "{{PYTHON_CMD}} .cursor/hooks/inject-retrieval-plan.py",
|
|
20
|
+
"timeout": 15
|
|
21
|
+
}
|
|
22
|
+
],
|
|
17
23
|
"beforeShellExecution": [
|
|
18
24
|
{
|
|
19
25
|
"command": "{{PYTHON_CMD}} .cursor/hooks/inject-shell-session-context.py",
|