chore: 升级 Trellis 并精简规则(09-05-trellis-upgrade-rule-cleanup)

这个提交包含在:
2026-09-06 11:14:41 +08:00
父节点 ab82fe30c0
当前提交 c3cef5cfc4
共修改 48 个文件,包含 4588 行新增和 1053 行删除
+50 -36
查看文件
@@ -58,34 +58,23 @@ session_auto_commit: false
# Trellis auto-detects workspaces during `trellis init`, but you can also
# configure them manually here.
#
# hyb-oa uses Trellis single-repo mode in this first migration. Domain specs
# live as layers under .trellis/spec/ and point to server/, client/, and docs/.
# packages:
# backend:
# path: server
# frontend:
# path: client
# path: packages/frontend
# backend:
# path: packages/backend
# docs:
# path: 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: backend
#-------------------------------------------------------------------------------
# Codex (dispatch behavior)
#-------------------------------------------------------------------------------
# Codex-only knob; other platforms ignore it. Trellis 0.6.12 supports native
# sub-agent context injection and recovery of truncated hook output, but hyb-oa
# deliberately keeps the main session in charge unless a task explicitly
# approves sub-agent work. "sub-agent" remains a backwards-compatible alias
# for "auto"; invalid explicit values safely use inline mode.
#
# In "auto" mode, sub-agents inherit the main session model unless their
# generated `.codex/agents/trellis-*.toml` file pins a model. There is no
# config.yaml model override.
#
codex:
dispatch_mode: inline # keep Codex main-session edits until a task explicitly asks for sub-agents
# default_package: frontend
#-------------------------------------------------------------------------------
# Channel worker OOM guard
@@ -118,27 +107,52 @@ channel:
# - /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: inline
#-------------------------------------------------------------------------------
# Sub-agent context injection limits
#-------------------------------------------------------------------------------
# Trellis 0.6.12 caps injected task artifacts and referenced context. Oversized
# files are truncated with notice; total-budget overflow degrades remaining
# files to path/reason/size index lines. Defaults are sufficient for hyb-oa;
# keep them documented but implicit until a real task proves they need tuning.
# `0` disables the corresponding byte limit.
# 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
# max_artifact_bytes: 65536
# max_total_bytes: 131072
# 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
#-------------------------------------------------------------------------------
# Optional one-turn escape hatch for the per-turn `<workflow-state>` breadcrumb.
# It uses a case-insensitive standalone-word match and does not affect session
# start or sub-agent context injection. The project keeps it disabled so task
# state remains deterministic.
# Escape hatch for the per-turn <workflow-state> 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"
# skip_keyword: "no-trellis" # "" disables the escape hatch entirely