# Trellis Configuration # Project-level settings for the Trellis workflow system # # All values have sensible defaults. Only override what you need. #------------------------------------------------------------------------------- # Session Recording #------------------------------------------------------------------------------- # Commit message used when auto-committing journal/index changes # after running add_session.py session_commit_message: "chore: record journal" # Maximum lines per journal file before rotating to a new one max_journal_lines: 2000 #------------------------------------------------------------------------------- # Session Auto-Commit #------------------------------------------------------------------------------- # Auto-commit behavior for session journal + task archive operations. # - true (default): scripts auto-stage and auto-commit journal / task changes # after add_session.py / task.py archive runs. # - false: scripts do not touch git. Files (journal-*.md, task archive moves) # are still written to disk; you decide whether to git add / commit. # # Use `false` if your project's .gitignore intentionally excludes `.trellis/` # and you want session data kept local-only, or if you prefer to review # staged changes manually before each commit. # # Accepts: true / false / yes / no / 1 / 0 / on / off (case-insensitive). # # session_auto_commit: true #------------------------------------------------------------------------------- # Task Lifecycle Hooks #------------------------------------------------------------------------------- # Shell commands to run after task lifecycle events. # Each hook receives TASK_JSON_PATH environment variable pointing to task.json. # Hook failures print a warning but do not block the main operation. # # hooks: # after_create: # - "echo 'Task created'" # after_start: # - "echo 'Task started'" # after_finish: # - "echo 'Task finished'" # after_archive: # - "echo 'Task archived'" #------------------------------------------------------------------------------- # Monorepo / Packages #------------------------------------------------------------------------------- # Declare packages for monorepo projects. # Trellis auto-detects workspaces during `trellis init`, but you can also # configure them manually here. # # packages: # frontend: # path: packages/frontend # backend: # path: packages/backend # docs: # path: docs-site # type: submodule # # For polyrepo / meta-repo layouts (independent .git in each subdir), # # mark the package with `git: true`. The runtime treats it as an # # independent repository for things like git-context display. # webapp: # path: ./webapp # git: true # Default package used when --package is not specified. # default_package: frontend #------------------------------------------------------------------------------- # Channel worker OOM guard #------------------------------------------------------------------------------- # Default safeguards for `trellis channel spawn` workers. The guard runs # at spawn time (cleans expired idle workers, then enforces the live-worker # budget) and inside each supervisor (self-terminates a worker that stays # continuously idle past `idle_timeout`). # # Precedence: CLI flag > env var (TRELLIS_CHANNEL_WORKER_IDLE_TIMEOUT / # TRELLIS_CHANNEL_MAX_LIVE_WORKERS) > this config > built-in default. # # `idle_timeout: 0` disables idle cleanup (workers can sit idle forever # unless explicitly killed or given `--timeout`). # `max_live_workers: 0` disables the spawn-time budget check. # # `trusted_context_dirs` extends the `--file`/`--jsonl`/`--agent` containment # check beyond the worker cwd — useful when `.trellis/tasks` or # `.trellis/workspace` is a symlink to an external directory. Realpaths under # any listed dir are accepted in addition to cwd. # `auto_trust_trellis_symlinks: false` disables the narrow auto-trust of # `.trellis/tasks` / `.trellis/workspace` when either is itself a top-level # symlink (auto-trust is on by default). # channel: worker_guard: idle_timeout: 5m max_live_workers: 6 # trusted_context_dirs: # - /work/user/trellis_workspace # auto_trust_trellis_symlinks: false #------------------------------------------------------------------------------- # Codex (dispatch behavior) #------------------------------------------------------------------------------- # Codex-only knob; other platforms ignore it. Default ("auto") dispatches # trellis-implement / trellis-check / trellis-research sub-agents. This does # not rely on inherited parent transcripts: `fork_turns` remains # caller-controlled, while Codex's native SubagentStart hook injects task # context when trusted and child-side loading remains the fallback when it is # unavailable. Set to "inline" only to keep implementation and checks in the # main session. "sub-agent" remains a backwards-compatible alias for "auto". # Invalid explicit values safely use inline mode. # # In "auto" mode, dispatched sub-agents inherit the main session's model # unless you pin one. To use a cheaper/faster model for implement/check/ # research sub-agent work, edit `model` / `model_reasoning_effort` directly # on the generated `.codex/agents/trellis-*.toml` files (see the commented # hint lines in those files) — there is no config.yaml knob for this, # `trellis update` preserves your edits across regeneration. # # codex: # dispatch_mode: auto # or "inline"; legacy alias: "sub-agent" #------------------------------------------------------------------------------- # Sub-agent context injection limits #------------------------------------------------------------------------------- # Caps how much task context (implement.jsonl / check.jsonl referenced files, # plus prd.md / design.md / implement.md) gets inlined into a sub-agent's # first prompt. Oversized files are truncated with a notice; once the total # payload cap is reached, remaining files degrade to index lines (path + # reason + size) instead of being inlined. # # All values are byte counts. `0` disables the corresponding limit. # # context_injection: # max_file_bytes: 32768 # per implement.jsonl / check.jsonl referenced file # max_artifact_bytes: 65536 # per task artifact (prd.md / design.md / implement.md) # max_total_bytes: 131072 # whole injected payload; overflow degrades to index lines #------------------------------------------------------------------------------- # Per-turn prompt injection #------------------------------------------------------------------------------- # Escape hatch for the per-turn breadcrumb. When a user # prompt contains the skip keyword as a standalone word (case-insensitive, # word-boundary match — "no-trellisfoo" does NOT count), the breadcrumb is # skipped for that turn only. Does not affect SessionStart or sub-agent # context injection. # # prompt_injection: # skip_keyword: "no-trellis" # "" disables the escape hatch entirely