- Agent Harness: workflow state, hooks, skills, sub-agents, and platform adapters that control how AI coding work moves.
- Built-in LLM wiki: specs, tasks, research, and journals stored in the repository so AI sessions can reload project knowledge from files.
- Team-level layer: git-tracked workflow/spec/task files plus per-developer workspace memory, so multiple people and multiple AI tools operate against the same conventions.
Trellis is AGPL-3.0 licensed. Internal team use is permitted. Commercial use of a Trellis-derived product or service requires prior contact: [email protected].
Design principles
Trellis treats AI coding as a workflow and knowledge-management problem, not a single chat session.Feature overview
Agent Harness
Built-in LLM wiki
Team-level behavior
Feature to module map
Workflow module
.trellis/workflow.md is the source of truth for Trellis’s Plan -> Execute -> Finish contract.
- phase definitions and numbered steps
- skill / sub-agent routing by platform capability
[workflow-state:STATUS]blocks used by the per-turn breadcrumb hook
.trellis/workflow.md.
Workflow-state module
On hook-capable platforms,inject-workflow-state.py or the equivalent plugin runs on each user prompt.
The runtime contract is:
- Resolve the Trellis root from
cwd. - Resolve the active task for the current session.
- Read
task.json.status, or synthesizeno_taskwhen no task is active. - Parse
.trellis/workflow.md. - Inject the matching
[workflow-state:STATUS]body into<workflow-state>...</workflow-state>.
Refer to workflow.md for current step.
Default statuses:
task.py create best-effort sets the current session’s active-task pointer, so planning is reachable during brainstorm and JSONL curation.
Task store module
Each task is one directory:
Task lifecycle hooks are command events, not generic status watchers:
Active-task runtime module
The current task is session-scoped:.trellis/.current-task is a fallback for command-line contexts. Session-scoped runtime pointers take precedence when the platform provides a session identity.
Context-loading module
Trellis loads context through three paths:
JSONL rows are plain file references:
jsonl entries -> prd.md -> design.md if present -> implement.md if present. implement.jsonl and check.jsonl list spec and
research files. Seed rows without a file field are ignored. Source files are
read during implementation and review, not pre-registered in JSONL.
Platform adapter module
Trellis uses each platform’s available primitives. The generated project files are the source of truth for an actual repository, but the default capability groups are:
If the local settings file disagrees with this table, follow the local settings file. Trellis projects are intentionally customizable.
Agent and skill module
Trellis ships three sub-agent roles when the platform supports sub-agents:
Skills cover phases where the main session needs guidance: brainstorm, before-dev, check, update-spec, finish-work, and meta customization. On platforms without sub-agents, skills carry more of the execution path directly in the main session.
Removed 0.4 mechanisms:
dispatch,plan, anddebugsub-agents were replaced by skill routing.- The SubagentStop-based Ralph Loop was replaced by
trellis-checkowning its retry loop. - Trellis no longer ships its own
/parallelworktree orchestrator; use the platform’s native worktree support.
LLM wiki modules
The wiki side is a set of repository files that AI sessions can reread.
Stable team rules belong in
.trellis/spec/. Task-specific facts belong in the task directory. Session notes belong in .trellis/workspace/<developer>/.
Finish module
Trellis separates implementation, work commits, and bookkeeping:- Implement/check agents produce a clean diff.
- The main session runs final verification and
trellis-update-spec. - Phase 3.4 proposes a batched commit plan, waits for one user confirmation, stages the listed files, and runs
git commit. It does not amend and does not push. /trellis:finish-workclassifies dirty paths, stops if current-task work is still uncommitted, archives the task, and writes the workspace journal.
/trellis:finish-work is not the command that commits feature code. Work commits happen first; archive and journal commits are bookkeeping after that.
Generated and protected files
trellis init and trellis update generate local files, but local edits matter:
For local customization, use the bundled
trellis-meta skill as the map. It tells an AI to read local architecture references first, inspect actual project files, and modify the project copy instead of changing node_modules or a global install.