Documentation Index
Fetch the complete documentation index at: https://docs.trytrellis.app/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
Installation
Requirements: Mac, Linux, and Windows are fully supported. Requires Node.js 18+ and Python
3.9+.
trellis init auto-detects installed platforms. You can also specify them explicitly via flags. Each platform needs to be init’d at least once. Pick any combination:
your-name becomes your developer identity and creates your personal workspace at .trellis/workspace/your-name/.
Supported flags: --claude, --cursor, --opencode, --codex, --kiro, --gemini, --qoder, --codebuddy, --copilot, --droid, --pi, --antigravity, --windsurf, --kilo.
Beyond these 14 configured platforms, any AI coding agent that reads the .agents/skills/ standard (Amp, Cline, Deep Agents, Firebender, Kimi Code CLI, Warp, and more) can also consume Trellis: Codex writes its skills there, and the files are directly usable by the rest of that ecosystem.
Platform Configuration
trellis init writes platform-specific config directories. Core concepts (.trellis/) are identical across platforms; the differences sit in how commands, skills, sub-agents, and hooks are delivered.
| Platform | Config Directory |
|---|---|
| Claude Code | .claude/commands/trellis/, agents/, skills/, hooks/ |
| Cursor | .cursor/commands/, agents/, skills/, hooks/ |
| OpenCode | .opencode/commands/trellis/, agents/, skills/, plugins/ |
| Codex | .codex/agents/, skills/, hooks/ + root AGENTS.md |
| Kiro | .kiro/agents/, skills/, hooks/ |
| Gemini CLI | .gemini/commands/trellis/, agents/, skills/, hooks/ |
| Qoder | .qoder/commands/, agents/, skills/, hooks/ |
| CodeBuddy | .codebuddy/commands/trellis/, agents/, skills/, hooks/ |
| Copilot | .github/copilot/, prompts/, agents/, skills/, hooks/ |
| Droid | .factory/commands/trellis/, droids/, skills/, hooks/ |
| Pi Agent | .pi/prompts/, skills/, agents/, extensions/trellis/, settings.json |
| Kilo | .kilocode/workflows/, skills/ |
| Antigravity | .agent/workflows/, skills/ |
| Windsurf | .windsurf/workflows/, skills/ |
.agents/skills/ is a shared cross-platform layer (agentskills.io standard). trellis init writes all skills into it too, so any agent that reads the .agents/skills/ standard (Amp, Cline, Deep Agents, Firebender, Kimi Code CLI, Warp, etc.) can consume them.
init Scenarios
trellis init dispatches on the presence of .trellis/ and .trellis/.developer. Match your situation to the command:
| Scenario | Command | Result |
|---|---|---|
| First-time project init | trellis init -u your-name --claude | Creates .trellis/ + bootstrap task 00-bootstrap-guidelines that walks you through filling project spec |
| Add a new platform to an existing project | trellis init --cursor (or no-arg interactive — it lists unconfigured platforms) | Writes the new platform’s config dir on top of the existing .trellis/; no task generated |
| New developer joining an existing project | trellis init -u their-name | Generates the joiner onboarding task 00-join-<slug> and guides reading workflow + spec; start it in the current AI session when ready |
| Same developer on a new machine | Same as above | Also generates a joiner task (because .developer isn’t committed). Archive it if you don’t need the refresher. |
| Same dev, same machine, re-run init | trellis init -u your-name | No-op — both .trellis/ and .developer already exist |
--force / --skip-existing only affect how file conflicts are resolved (overwrite vs skip); they don’t change the dispatch logic itself.
Dispatch signal:
.trellis/.developer is a gitignored per-checkout identity file (by design, never committed), so a fresh clone never has one — this is the clean signal for “new developer on this checkout”. .trellis/workspace/<name>/ is committed and cannot serve this role.Basic Flow
Describe what you want to do; AI followsworkflow.md through Plan → Execute → Finish. If the current flow looks done, run /trellis:continue.
Agent-capable platforms (Claude Code, OpenCode, Cursor, Gemini, Qoder, CodeBuddy, Copilot, Droid,
Pi Agent, and Codex with
features.hooks enabled — legacy: codex_hooks) load workflow and
context automatically via a SessionStart hook or extension on every new session — they don’t ship
/trellis:start as a slash command, so open a fresh session if you need a reload. Only agent-less
platforms (Kilo, Antigravity, Windsurf) ship /trellis:start (or /start.md) as an explicit
entry point.Directory Structure
Below is the layout aftertrellis init with Claude Code. Other platforms write to their own sub-directories but share the same .trellis/ core.
Your First Task
Starting a Session
- General
- Codex
- Kiro
- Kilo / Antigravity / Windsurf
Open the terminal. The SessionStart hook fires automatically, so Trellis context is already in the AI’s context:
workflow.mdTOC + Phase 1/2/3 step-level details- Identity, git status, active task list
- Spec indexes
workflow.md + get_context.py and asks “What would you like to work on?”. These platforms don’t expose /trellis:start as a slash command (the hook already owns start), so don’t go looking for it.Example: Starting a New Project from Scratch
This is the first Trellis loop for a new product, service, SDK, package, or internal tool. Real situation: you are starting a B2B dashboard with login, team management, billing, and analytics. AI can help move fast, but each session should not reinvent the directory structure, API style, component pattern, and testing rules. Starting prompt:- After project initialization, run
trellis init. It writes default spec templates under.trellis/spec/(about 17 placeholder files acrossbackend/,frontend/, andguides, covering directory structure, error handling, logging, component guidelines, cross-layer thinking, and similar rules), and creates the00-bootstrap-guidelinestask. - Use the bootstrap task to discuss product requirements and the project tech stack with AI, so the AI has enough context before writing code.
- Optional: use the bundled
trellis-spec-bootstarpskill so AI can draft first-pass specs from the real codebase. It is installed with Trellis, so there is no extra marketplace download step. - Fill the default specs produced by
trellis initfirst, based on what you know now. Do not design the entire project upfront. - Review the generated spec quality by hand.
- Create the smallest task that can run end to end.
- Continue with
/trellis:continue; Trellis will move the task through check, update-spec, commit, and finish.
AI Creates the Task and Develops
You say: “Add user login feature”. The AI walks the three phases fromworkflow.md:
/trellis:continue. AI uses the active task’s status plus the per-turn workflow-state breadcrumb and, per workflow.md, figures out the next step (before-dev / check / update-spec, etc.) and continues.
Finishing the Session
finish-work calls add_session.py to append a journal entry and update your personal index. If the task is actually done (code merged, acceptance criteria met), it also archives the task via task.py archive.
Cross-Session Memory
Next time you open a session, the SessionStart hook (or the platform’s prelude) reads your workspace journal and active task list, so AI can recall what you did last:.trellis/workspace/{name}/journal-N.md; every /trellis:finish-work appends one. Trellis tracks each AI session’s active task internally so you can pick it up next time; task.py finish clears that pointer.
Remote Spec Templates
Instead of writing specs from scratch, pull pre-built spec templates during init.Official Marketplace
Custom Registry (--registry)
Pull specs from your own GitHub, GitLab, or Bitbucket repository:
provider:user/repo[/subdir][#ref]
| Provider | Prefix |
|---|---|
| GitHub | gh: or github: |
| GitLab | gitlab: |
| Bitbucket | bitbucket: |
main if omitted.
Handling Existing Specs
When.trellis/spec/ already exists, use a strategy flag:
| Flag | Behavior |
|---|---|
--overwrite | Delete existing spec directory, then download |
--append | Only copy files that don’t already exist |
| (neither) | Interactive prompt asks what to do |
Building a Custom Marketplace
Create anindex.json in your repository:
path field is relative to the repository root. Only type: "spec" is supported currently.
Private Repositories
For private repos, set theGIGET_AUTH environment variable with a personal access token: