Skip to main content
Trellis is a Team-level Agent Harness with built-in LLM wiki. In implementation terms, that means two systems share the same project files:
  • 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.
This document maps that idea to the current Trellis feature set, the modules that implement each feature, and the files to inspect when customizing a generated project. For the user flow, see How It Works.
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.
The file owns three things:
  • phase definitions and numbered steps
  • skill / sub-agent routing by platform capability
  • [workflow-state:STATUS] blocks used by the per-turn breadcrumb hook
Changing workflow behavior starts here. Platform commands, skills, and agent files may also need wording updates if they describe the same flow, but the workflow contract itself belongs in .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:
  1. Resolve the Trellis root from cwd.
  2. Resolve the active task for the current session.
  3. Read task.json.status, or synthesize no_task when no task is active.
  4. Parse .trellis/workflow.md.
  5. Inject the matching [workflow-state:STATUS] body into <workflow-state>...</workflow-state>.
Marker syntax:
The hook scripts are parser-only. They do not contain fallback copies of the breadcrumb text. If a matching block is missing, the hook emits 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:
Important files: Task lifecycle hooks are command events, not generic status watchers:

Active-task runtime module

The current task is session-scoped:
That file points one AI session or window at one task. Different windows can work on different tasks in the same repository. .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:
In the standard flow, task artifacts are read separately from JSONL manifests. The shared order is 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, and debug sub-agents were replaced by skill routing.
  • The SubagentStop-based Ralph Loop was replaced by trellis-check owning its retry loop.
  • Trellis no longer ships its own /parallel worktree 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:
  1. Implement/check agents produce a clean diff.
  2. The main session runs final verification and trellis-update-spec.
  3. 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.
  4. /trellis:finish-work classifies 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.

Customization map