trellis-meta
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTrellis Meta-Skill
Trellis 元技能
Version Compatibility
版本兼容性
| Item | Value |
|---|---|
| Trellis CLI Version | 0.3.0-beta.5 |
| Skill Last Updated | 2026-01-31 |
| Min Claude Code Version | 1.0.0+ |
⚠️ Version Mismatch Warning: If your Trellis CLI version differs from above, some features may not work as documented. Runto check.trellis --version
| 项 | 值 |
|---|---|
| Trellis CLI 版本 | 0.3.0-beta.5 |
| 技能最后更新时间 | 2026-01-31 |
| 最低 Claude Code 版本 | 1.0.0+ |
⚠️ 版本不匹配警告:如果你的Trellis CLI版本与上述版本不同,部分功能可能无法按文档所述工作。运行进行检查。trellis --version
Platform Compatibility
平台兼容性
Feature Support Matrix
功能支持矩阵
| Feature | Claude Code | Cursor | OpenCode (Future) |
|---|---|---|---|
| Core Systems | |||
| Workspace system | ✅ Full | ✅ Full | ✅ Planned |
| Task system | ✅ Full | ✅ Full | ✅ Planned |
| Spec system | ✅ Full | ✅ Full | ✅ Planned |
| Slash commands | ✅ Full | ✅ Full | ⏳ TBD |
| Agent definitions | ✅ Full | ⚠️ Manual | ⏳ TBD |
| Hook-Dependent Features | |||
| SessionStart hook | ✅ Full | ❌ None | ⏳ TBD |
| PreToolUse hook | ✅ Full | ❌ None | ⏳ TBD |
| SubagentStop hook | ✅ Full | ❌ None | ⏳ TBD |
| Auto context injection | ✅ Full | ❌ Manual | ⏳ TBD |
| Ralph Loop | ✅ Full | ❌ None | ⏳ TBD |
| Multi-Agent/Session | |||
| Multi-Agent (current dir) | ✅ Full | ⚠️ Limited | ⏳ TBD |
| Multi-Session (worktrees) | ✅ Full | ❌ None | ⏳ TBD |
| ✅ Full | ❌ None | ⏳ TBD |
| 功能 | Claude Code | Cursor | OpenCode(未来) |
|---|---|---|---|
| 核心系统 | |||
| 工作区系统 | ✅ 完全支持 | ✅ 完全支持 | ✅ 计划支持 |
| 任务系统 | ✅ 完全支持 | ✅ 完全支持 | ✅ 计划支持 |
| 规范系统 | ✅ 完全支持 | ✅ 完全支持 | ✅ 计划支持 |
| 斜杠命令 | ✅ 完全支持 | ✅ 完全支持 | ⏳ 待定 |
| Agent 定义 | ✅ 完全支持 | ⚠️ 手动支持 | ⏳ 待定 |
| 依赖钩子的功能 | |||
| SessionStart 钩子 | ✅ 完全支持 | ❌ 不支持 | ⏳ 待定 |
| PreToolUse 钩子 | ✅ 完全支持 | ❌ 不支持 | ⏳ 待定 |
| SubagentStop 钩子 | ✅ 完全支持 | ❌ 不支持 | ⏳ 待定 |
| 自动上下文注入 | ✅ 完全支持 | ❌ 手动操作 | ⏳ 待定 |
| Ralph Loop | ✅ 完全支持 | ❌ 不支持 | ⏳ 待定 |
| 多Agent/会话 | |||
| 多Agent(当前目录) | ✅ 完全支持 | ⚠️ 有限支持 | ⏳ 待定 |
| 多会话(工作树) | ✅ 完全支持 | ❌ 不支持 | ⏳ 待定 |
| ✅ 完全支持 | ❌ 不支持 | ⏳ 待定 |
Legend
图例
- ✅ Full: Feature works as documented
- ⚠️ Limited/Manual: Works but requires manual steps
- ❌ None: Not supported on this platform
- ⏳ TBD: Under consideration for future support
- ✅ 完全支持:功能按文档所述正常工作
- ⚠️ 有限/手动支持:可工作但需要手动步骤
- ❌ 不支持:该平台不支持此功能
- ⏳ 待定:正在考虑未来支持
Platform-Specific Notes
平台特定说明
Claude Code (Full Support)
Claude Code(完全支持)
All features work as documented. Hooks provide automatic context injection and quality enforcement.
所有功能均按文档所述工作。钩子提供自动上下文注入和质量管控。
Cursor (Partial Support)
Cursor(部分支持)
- Works: Workspace, tasks, specs, commands (read manually)
- Doesn't work: Hooks, auto-injection, Ralph Loop, Multi-Session
- Workaround: Manually read spec files at session start; no automatic quality gates
- 可用功能:工作区、任务、规范、命令(需手动读取)
- 不可用功能:钩子、自动注入、Ralph Loop、多会话
- 解决方法:会话开始时手动读取规范文件;无自动质量关卡
OpenCode (Future Consideration)
OpenCode(未来考虑)
- Need to evaluate OpenCode's extension/hook capabilities
- May require adapter layer for hook compatibility
- Core file-based systems should work once integrated
- 需要评估OpenCode的扩展/钩子能力
- 可能需要适配层以实现钩子兼容性
- 核心基于文件的系统集成后应可正常工作
Designing for Portability
可移植性设计
When customizing Trellis, consider platform compatibility:
┌─────────────────────────────────────────────────────────────┐
│ PORTABLE (All Platforms) │
│ - .trellis/workspace/ - .trellis/tasks/ │
│ - .trellis/spec/ - .claude/commands/ │
│ - File-based configs - JSONL context files │
└─────────────────────────────────────────────────────────────┘
│
┌─────────────────────────────▼───────────────────────────────┐
│ CLAUDE CODE ONLY │
│ - .claude/hooks/ - .claude/settings.json hooks │
│ - SubagentStop control - Auto context injection │
│ - Ralph Loop - Multi-Session worktrees │
│ - claude CLI features - --resume, --agent flags │
└─────────────────────────────────────────────────────────────┘自定义Trellis时,请考虑平台兼容性:
┌─────────────────────────────────────────────────────────────┐
│ 可移植(全平台) │
│ - .trellis/workspace/ - .trellis/tasks/ │
│ - .trellis/spec/ - .claude/commands/ │
│ - 基于文件的配置 - JSONL 上下文文件 │
└─────────────────────────────────────────────────────────────┘
│
┌─────────────────────────────▼───────────────────────────────┐
│ 仅支持CLAUDE CODE │
│ - .claude/hooks/ - .claude/settings.json hooks │
│ - SubagentStop 控制 - 自动上下文注入 │
│ - Ralph Loop - 多会话工作树 │
│ - claude CLI 功能 - --resume, --agent 标志 │
└─────────────────────────────────────────────────────────────┘Purpose
用途
This is the meta-skill for Trellis - it documents the original, unmodified Trellis system. When customizing Trellis for a specific project, record changes in a project-local skill (), keeping this meta-skill as the authoritative reference for vanilla Trellis.
trellis-local这是Trellis的元技能——它记录了原始、未修改的Trellis系统。针对特定项目自定义Trellis时,请将更改记录在项目本地技能()中,保持本元技能作为原生Trellis的权威参考。
trellis-localSkill Hierarchy
技能层级
~/.claude/skills/
└── trellis-meta/ # THIS SKILL - Original Trellis documentation
# ⚠️ DO NOT MODIFY for project-specific changes
project/.claude/skills/
└── trellis-local/ # Project-specific customizations
# ✅ Record all modifications hereWhy this separation?
- User may have multiple projects with different Trellis customizations
- Each project's skill tracks ITS OWN modifications
trellis-local - The meta-skill remains clean as the reference for original Trellis
- Enables easy upgrades: compare meta-skill with new Trellis version
~/.claude/skills/
└── trellis-meta/ # 本技能 - 原始Trellis文档
# ⚠️ 请勿针对项目特定修改进行更改
project/.claude/skills/
└── trellis-local/ # 项目特定自定义
# ✅ 所有修改均记录于此为何采用这种分离方式?
- 用户可能有多个项目,每个项目的Trellis自定义不同
- 每个项目的技能跟踪其自身的修改
trellis-local - 元技能保持整洁,作为原始Trellis的参考
- 便于升级:将元技能与新版本Trellis进行对比
Self-Iteration Protocol
自迭代协议
When modifying Trellis for a project, follow this protocol:
针对项目修改Trellis时,请遵循以下协议:
1. Check for Existing Project Skill
1. 检查是否存在项目技能
bash
undefinedbash
undefinedLook for project-local skill
查找项目本地技能
ls -la .claude/skills/trellis-local/
undefinedls -la .claude/skills/trellis-local/
undefined2. Create Project Skill if Missing
2. 若缺失则创建项目技能
If no exists, create it:
trellis-localbash
mkdir -p .claude/skills/trellis-localThen create :
.claude/skills/trellis-local/SKILL.mdmarkdown
---
name: trellis-local
description: |
Project-specific Trellis customizations for [PROJECT_NAME].
This skill documents modifications made to the vanilla Trellis system
in this project. Inherits from trellis-meta for base documentation.
---如果不存在,创建它:
trellis-localbash
mkdir -p .claude/skills/trellis-local然后创建:
.claude/skills/trellis-local/SKILL.mdmarkdown
---
name: trellis-local
description: |
针对[PROJECT_NAME]的项目特定Trellis自定义。
本技能记录了本项目中对原生Trellis系统所做的修改。继承自trellis-meta以获取基础文档。
---Trellis Local - [PROJECT_NAME]
Trellis Local - [PROJECT_NAME]
Base Version
基础版本
Trellis version: X.X.X (from package.json or trellis --version)
Date initialized: YYYY-MM-DD
Trellis版本: X.X.X(来自package.json或trellis --version)
初始化日期: YYYY-MM-DD
Customizations
自定义内容
Commands Added
添加的命令
(none yet)
(暂无)
Agents Modified
修改的Agent
(none yet)
(暂无)
Hooks Changed
更改的钩子
(none yet)
(暂无)
Specs Customized
自定义的规范
(none yet)
(暂无)
Workflow Changes
工作流更改
(none yet)
(暂无)
Changelog
更新日志
YYYY-MM-DD
YYYY-MM-DD
- Initial setup
undefined- 初始设置
undefined3. Record Every Modification
3. 记录每一项修改
When making ANY change to Trellis, update :
trellis-local/SKILL.md对Trellis进行任何更改时,更新:
trellis-local/SKILL.mdExample: Adding a new command
示例:添加新命令
markdown
undefinedmarkdown
undefinedCommands Added
添加的命令
/trellis:my-command
/trellis:my-command
- File:
.claude/commands/trellis/my-command.md - Purpose: [what it does]
- Added: 2026-01-31
- Why: [reason for adding]
undefined- 文件:
.claude/commands/trellis/my-command.md - 用途: [功能说明]
- 添加时间: 2026-01-31
- 原因: [添加理由]
undefinedExample: Modifying a hook
示例:修改钩子
markdown
undefinedmarkdown
undefinedHooks Changed
更改的钩子
inject-subagent-context.py
inject-subagent-context.py
- Change: Added support for type
my-agent - Lines modified: 45-67
- Date: 2026-01-31
- Why: [reason]
undefined- 更改: 新增对类型的支持
my-agent - 修改行: 45-67
- 日期: 2026-01-31
- 原因: [修改理由]
undefined4. Never Modify Meta-Skill for Project Changes
4. 请勿为项目修改元技能
The skill should ONLY be updated when:
trellis-meta- Trellis releases a new version
- Fixing documentation errors in the original
- Adding missing documentation for original features
trellis-meta- Trellis发布新版本
- 修复原始文档中的错误
- 为原始功能添加缺失的文档
Architecture Overview
架构概述
Trellis transforms AI assistants into structured development partners through enforced context injection.
Trellis通过强制上下文注入将AI助手转变为结构化的开发伙伴。
System Layers
系统层级
┌─────────────────────────────────────────────────────────────────────┐
│ USER INTERACTION │
│ /trellis:start /trellis:parallel /trellis:finish-work │
└─────────────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────────────▼───────────────────────────────────┐
│ SKILLS LAYER │
│ .claude/commands/trellis/*.md (slash commands) │
│ .claude/agents/*.md (sub-agent definitions) │
└─────────────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────────────▼───────────────────────────────────┐
│ HOOKS LAYER │
│ SessionStart → session-start.py (injects workflow + context) │
│ PreToolUse:Task → inject-subagent-context.py (spec injection) │
│ SubagentStop → ralph-loop.py (quality enforcement) │
└─────────────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────────────▼───────────────────────────────────┐
│ PERSISTENCE LAYER │
│ .trellis/workspace/ (journals, session history) │
│ .trellis/tasks/ (task tracking, context files) │
│ .trellis/spec/ (coding guidelines) │
└─────────────────────────────────────────────────────────────────────┘┌─────────────────────────────────────────────────────────────────────┐
│ 用户交互 │
│ /trellis:start /trellis:parallel /trellis:finish-work │
└─────────────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────────────▼───────────────────────────────────┐
│ 技能层 │
│ .claude/commands/trellis/*.md (斜杠命令) │
│ .claude/agents/*.md (子Agent定义) │
└─────────────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────────────▼───────────────────────────────────┐
│ 钩子层 │
│ SessionStart → session-start.py (注入工作流 + 上下文) │
│ PreToolUse:Task → inject-subagent-context.py (规范注入) │
│ SubagentStop → ralph-loop.py (质量管控) │
└─────────────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────────────▼───────────────────────────────────┐
│ 持久化层 │
│ .trellis/workspace/ (日志、会话历史) │
│ .trellis/tasks/ (任务跟踪、上下文文件) │
│ .trellis/spec/ (编码规范) │
└─────────────────────────────────────────────────────────────────────┘Key Design Principles
核心设计原则
| Principle | Description |
|---|---|
| Specs Injected, Not Remembered | Hooks enforce specs - agents always receive context |
| Read Before Write | Understand guidelines before writing code |
| Layered Context | Only relevant specs load (via JSONL files) |
| Human Commits | AI never commits - human validates first |
| Pure Dispatcher | Dispatch agent only orchestrates |
| 原则 | 描述 |
|---|---|
| 规范注入,而非记忆 | 钩子强制注入规范 - Agent始终接收上下文 |
| 先读再写 | 编写代码前先理解规范 |
| 分层上下文 | 仅加载相关规范(通过JSONL文件) |
| 人工提交 | AI从不提交代码 - 需人工先验证 |
| 纯调度器 | 调度Agent仅负责协调 |
Core Components
核心组件
1. Workspace System
1. 工作区系统
Track development progress across sessions with per-developer isolation.
.trellis/workspace/
├── index.md # Global overview
└── {developer}/ # Per-developer
├── index.md # Personal index (@@@auto markers)
└── journal-N.md # Session journals (max 2000 lines)Key files: (identity), journals (session history)
.trellis/.developer按开发者隔离跟踪跨会话的开发进度。
.trellis/workspace/
├── index.md | 全局概览
└── {developer}/ | 按开发者划分
├── index.md | 个人索引(@@@auto标记)
└── journal-N.md | 会话日志(最多2000行)关键文件:(身份标识)、日志(会话历史)
.trellis/.developer2. Task System
2. 任务系统
Track work items with phase-based execution.
.trellis/tasks/{MM-DD-slug-assignee}/
├── task.json # Metadata, phases, branch
├── prd.md # Requirements
├── implement.jsonl # Context for implement agent
├── check.jsonl # Context for check agent
└── debug.jsonl # Context for debug agent按阶段执行跟踪工作项。
.trellis/tasks/{MM-DD-slug-assignee}/
├── task.json | 元数据、阶段、分支
├── prd.md | 需求文档
├── implement.jsonl | 实现Agent的上下文
├── check.jsonl | 检查Agent的上下文
└── debug.jsonl | 调试Agent的上下文3. Spec System
3. 规范系统
Maintain coding standards that get injected to agents.
.trellis/spec/
├── frontend/ # Frontend guidelines
├── backend/ # Backend guidelines
└── guides/ # Thinking guides维护将注入Agent的编码标准。
.trellis/spec/
├── frontend/ | 前端规范
├── backend/ | 后端规范
└── guides/ | 思考指南4. Hooks System
4. 钩子系统
Automatically inject context and enforce quality.
| Hook | When | Purpose |
|---|---|---|
| Session begins | Inject workflow, guidelines |
| Before sub-agent | Inject specs via JSONL |
| Check agent stops | Enforce verification (Ralph Loop) |
自动注入上下文并执行质量管控。
| 钩子 | 触发时机 | 用途 |
|---|---|---|
| 会话开始时 | 注入工作流、规范 |
| 子Agent执行前 | 通过JSONL注入规范 |
| 检查Agent停止时 | 执行验证(Ralph Loop) |
5. Agent System
5. Agent系统
Specialized agents for different phases.
| Agent | Purpose | Restriction |
|---|---|---|
| Orchestrate pipeline | Pure dispatcher |
| Evaluate requirements | Can reject unclear reqs |
| Find code patterns | Read-only |
| Write code | No git commit |
| Review and self-fix | Ralph Loop controlled |
| Fix issues | Precise fixes only |
针对不同阶段的专用Agent。
| Agent | 用途 | 限制 |
|---|---|---|
| 协调流水线 | 纯调度器 |
| 评估需求 | 可拒绝不明确的需求 |
| 查找代码模式 | 只读 |
| 编写代码 | 不执行Git提交 |
| 评审并自修复 | 受Ralph Loop控制 |
| 修复问题 | 仅精确修复 |
6. Multi-Agent Pipeline
6. 多Agent流水线
Run parallel isolated sessions via Git worktrees.
plan.py → start.py → Dispatch → implement → check → create-pr通过Git工作树运行并行隔离会话。
plan.py → start.py → Dispatch → implement → check → create-prCustomization Guide
自定义指南
Adding a Command
添加命令
- Create
.claude/commands/trellis/my-command.md - Update skill with the change
trellis-local
- 创建
.claude/commands/trellis/my-command.md - 在技能中记录此更改
trellis-local
Adding an Agent
添加Agent
- Create with YAML frontmatter
.claude/agents/my-agent.md - Update to handle new agent type
inject-subagent-context.py - Create in task directories
my-agent.jsonl - Update skill
trellis-local
- 创建带YAML前置内容的
.claude/agents/my-agent.md - 更新以支持新Agent类型
inject-subagent-context.py - 在任务目录中创建
my-agent.jsonl - 更新技能
trellis-local
Modifying Hooks
修改钩子
- Edit the hook script in
.claude/hooks/ - Document the change in skill
trellis-local - Note which lines were modified and why
- 编辑中的钩子脚本
.claude/hooks/ - 在技能中记录更改
trellis-local - 注明修改的行号及原因
Extending Specs
扩展规范
- Create new category in
.trellis/spec/my-category/ - Add and guideline files
index.md - Reference in JSONL context files
- Update skill
trellis-local
- 在中创建新分类
.trellis/spec/my-category/ - 添加和规范文件
index.md - 在JSONL上下文文件中引用
- 更新技能
trellis-local
Changing Task Workflow
修改任务工作流
- Modify array in
next_actiontask.json - Update dispatch or hook scripts as needed
- Document in skill
trellis-local
- 修改中的
task.json数组next_action - 根据需要更新调度或钩子脚本
- 在技能中记录
trellis-local
Resources
资源
Reference documents are organized by platform compatibility:
references/
├── core/ # All Platforms (Claude Code, Cursor, etc.)
├── claude-code/ # Claude Code Only
├── how-to-modify/ # Modification Guides
└── meta/ # Documentation & Templates参考文档按平台兼容性组织:
references/
├── core/ | 全平台(Claude Code、Cursor等)
├── claude-code/ | 仅Claude Code
├── how-to-modify/ | 修改指南
└── meta/ | 文档与模板core/
- All Platforms
core/core/
- 全平台
core/| Document | Content |
|---|---|
| Core systems introduction |
| All |
| Workspace system, journals, developer identity |
| Task system, directories, JSONL context files |
| Spec system, guidelines organization |
| Platform-independent scripts |
| 文档 | 内容 |
|---|---|
| 核心系统介绍 |
| 所有 |
| 工作区系统、日志、开发者身份 |
| 任务系统、目录、JSONL上下文文件 |
| 规范系统、规范组织 |
| 平台无关脚本 |
claude-code/
- Claude Code Only
claude-code/claude-code/
- 仅Claude Code
claude-code/| Document | Content |
|---|---|
| Claude Code features introduction |
| Hook system, context injection |
| Agent types, invocation, Task tool |
| Quality enforcement mechanism |
| Parallel worktree sessions |
| worktree.yaml configuration |
| Claude Code only scripts |
| 文档 | 内容 |
|---|---|
| Claude Code功能介绍 |
| 钩子系统、上下文注入 |
| Agent类型、调用、Task工具 |
| 质量管控机制 |
| 并行工作树会话 |
| worktree.yaml配置 |
| 仅Claude Code可用脚本 |
how-to-modify/
- Modification Guides
how-to-modify/how-to-modify/
- 修改指南
how-to-modify/| Document | Scenario |
|---|---|
| Quick reference for all modifications |
| Adding slash commands |
| Adding new agent types |
| Adding spec categories |
| Adding workflow phases |
| Modifying hook behavior |
| Changing verify commands |
| 文档 | 场景 |
|---|---|
| 所有修改的快速参考 |
| 添加斜杠命令 |
| 添加新Agent类型 |
| 添加规范分类 |
| 添加工作流阶段 |
| 修改钩子行为 |
| 修改验证命令 |
meta/
- Documentation
meta/meta/
- 文档
meta/| Document | Content |
|---|---|
| Detailed platform support matrix |
| How to document customizations |
| Template for project-local skill |
| 文档 | 内容 |
|---|---|
| 详细平台支持矩阵 |
| 如何记录自定义内容 |
| 项目本地技能模板 |
Quick Reference
快速参考
Key Scripts
关键脚本
| Script | Purpose |
|---|---|
| Get session context |
| Task management |
| Record session |
| Start parallel agent |
| 脚本 | 用途 |
|---|---|
| 获取会话上下文 |
| 任务管理 |
| 记录会话 |
| 启动并行Agent |
Key Paths
关键路径
| Path | Purpose |
|---|---|
| Developer identity |
| Active task pointer |
| Main workflow docs |
| Hook configuration |
| 路径 | 用途 |
|---|---|
| 开发者身份标识 |
| 活动任务指针 |
| 主工作流文档 |
| 钩子配置 |
Upgrade Protocol
升级协议
When upgrading Trellis to a new version:
- Compare new meta-skill with current
- Review changes in new version
- Check for conflicts
trellis-local - Merge carefully, preserving customizations
- Update with migration notes
trellis-local
markdown
undefined将Trellis升级到新版本时:
- 对比新版本元技能与当前版本
- 查看新版本中的更改
- 检查是否存在冲突
trellis-local - 谨慎合并,保留自定义内容
- 更新并添加迁移说明
trellis-local
markdown
undefinedChangelog
更新日志
2026-02-01 - Upgraded to Trellis X.Y.Z
2026-02-01 - 升级到Trellis X.Y.Z
- Merged new hook behavior from meta-skill
- Kept custom agent
my-agent - Updated check.jsonl template
undefined- 合并了元技能中的新钩子行为
- 保留了自定义Agent
my-agent - 更新了check.jsonl模板
undefined