Trellis

Создано: 27 мая 2026 г.

Отвечено с использованием GPT-5.5 Thinking от Chat01

Вопрос

https://github.com/mindfold-ai/Trellis
直接看源码。Trellis如何执行工作流

https://github.com/mattpocock/skills/tree/main/skills/engineering/grill-with-docs
使用claude code opus 4.7 & grill-with-docs规划任务,随后用codex gpt 5.5审核并执行任务,如何让这个流程无缝接入Trellis

Ответ

你这个思路,其实和 Trellis 的设计哲学是完全一致的:

  • Claude Opus 4.7 → 负责“战略/规划/语义建模”
  • Codex GPT-5.5 → 负责“执行/验证/自动化”
  • Trellis → 负责“上下文总线 + 状态机 + 任务记忆”

重点是:

Trellis 本身不是 Agent。 它是 Agent Workflow Runtime。

也就是说,它不是 AutoGen 那种“智能体框架”,而是:

  • 统一上下文
  • 统一任务状态
  • 统一技能入口
  • 统一记忆层
  • 统一 handoff protocol

这一点从源码结构就能看出来。(GitHub)


一、Trellis 实际是怎么执行工作流的

官方 README 写得比较“产品化”。

但从源码结构看,本质是:

text
Human Platform Adapter (Claude/Codex/Cursor) AGENTS.md .trellis/workflow.md Skill Router Task Context Loader Agent Runtime Workspace Journal / Spec Promotion

核心结构:

text
.trellis/ ├── spec/ # 长期知识 ├── tasks/ # 当前任务 ├── workspace/ # 会话记忆 ├── workflow.md # 生命周期 └── scripts/ # 自动化入口

(GitHub)


二、真正关键的不是 workflow.md

而是:

「上下文分层」

Trellis 最大的东西其实是:

text
spec → task → workspace

这三层。


1. spec/

长期稳定知识:

text
架构规范 DDD术语 编码规范 ADR 领域语言

Claude 最擅长维护这个。

因为 Opus 4.7 在:

  • domain modeling
  • architecture reasoning
  • ambiguity reduction
  • glossary normalization

上明显更强。(RanketAI)

这和 grill-with-docs 完全契合。


2. tasks/

这里才是执行层。

通常结构:

text
.trellis/tasks/feature-auth/ ├── PRD.md ├── research.md ├── implementation-plan.md ├── acceptance.md ├── review.md └── context.jsonl

重点:

Trellis 不把上下文塞进 prompt。

而是:

用 task 文件系统当“外部思维”。

这是它最强的地方。


3. workspace/

这是 session memory。

比如:

text
workspace/alice/journal.md workspace/bob/notes.md

Agent 不是靠大上下文记忆。

而是靠:

text
externalized memory

这也是 Trellis 和普通 CLAUDE.md 最大区别。(GitHub)


三、Trellis 真正的“执行器”是什么

很多人误会了。

Trellis 没有中央 orchestration engine。

真正执行的是:

text
Claude Code Codex Cursor Pi Agent

Trellis 只是:

text
workflow compiler + context injector + skill router

README 里已经直接说了:

text
Platform adapters Generated commands, hooks, skills, prompts, workflows

(GitHub)

所以:

Trellis 本质是:

text
Git-native Agent OS

不是 LangGraph。

不是 CrewAI。

不是 AutoGen。


四、grill-with-docs 为什么和 Trellis 天然兼容

因为 Matt Pocock 的 skill 本质是:

「领域建模器」

它会:

  • 逼问边界条件
  • 对齐术语
  • 检查代码与语言是否一致
  • 自动维护 CONTEXT.md
  • 必要时生成 ADR

源码写得非常明确。(GitHub)

它甚至已经在做:

text
CONTEXT.md ADR Glossary

这和 Trellis 的:

text
spec/ tasks/

天然一一对应。


五、你要的最佳架构(真正无缝)

你现在的目标:

text
Claude Opus 4.7 grill-with-docs PRD + Architecture + ADR Codex GPT-5.5 Implementation + Validation + Refactor

这是正确方向。

但要无缝:

不能靠聊天记录交接。

必须:

用 Trellis Task State 做 handoff。


六、推荐的 Trellis 工作流(非常重要)

建议你把 workflow 拆成:

text
PLAN SPEC EXECUTE VERIFY PROMOTE

而不是:

text
chat → code

七、真正推荐的目录结构

建议:

text
.trellis/ ├── spec/ │ ├── architecture/ │ ├── glossary/ │ ├── coding/ │ └── adr/ ├── tasks/ │ └── auth-refactor/ │ ├── PRD.md │ ├── DOMAIN.md │ ├── ADR.md │ ├── IMPLEMENTATION_PLAN.md │ ├── ACCEPTANCE.md │ ├── REVIEW_NOTES.md │ └── context.jsonl ├── workflow.md └── scripts/

八、Claude 和 Codex 的职责必须硬分离

这是核心。


Claude Opus 4.7 负责:

text
需求澄清 领域建模 ADR 边界条件 Glossary 风险分析 任务拆分

因为 Opus 更像:

text
staff engineer

(RanketAI)


Codex GPT-5.5 负责:

text
实现 测试 自动修复 terminal loop lint integration multi-file patching

因为 GPT-5.5 更强的是:

text
autonomous execution

(RanketAI)


九、最关键的一步:把 grill-with-docs 变成 Trellis Skill

你不要“调用 grill-with-docs”。

你要:

把它注册进 Trellis Skill Router。


正确做法

在:

text
.agents/skills/

下面挂:

text
.agents/skills/grill-with-docs/

因为 Trellis 已经支持:

text
.agents/skills/ .codex/agents/

(GitHub)


十、然后 workflow.md 里这样定义

例如:

md
# Planning Phase Primary Agent: - Claude Opus 4.7 Required Skills: - grill-with-docs - to-prd Outputs: - PRD.md - ADR.md - IMPLEMENTATION_PLAN.md Exit Criteria: - Acceptance criteria defined - Terminology stabilized - ADR conflicts resolved

然后:

md
# Execution Phase Primary Agent: - Codex GPT-5.5 Inputs: - PRD.md - IMPLEMENTATION_PLAN.md - ADR.md Required Skills: - tdd - diagnose Exit Criteria: - tests pass - lint pass - review.md generated

十一、真正的“无缝”在于:

Claude 不直接给 Codex Prompt

而是:

text
Claude → structured artifacts → Trellis → Codex

这是关键中的关键。

否则:

  • context drift
  • prompt entropy
  • hallucinated assumptions

一定会发生。


十二、最佳实践:让 Codex 永远只读稳定层

不要让 Codex读:

text
raw chat

只读:

text
PRD ADR Acceptance Implementation Plan

这样 GPT-5.5 会非常稳定。

因为它在:

text
明确任务边界 + terminal execution + autonomous iteration

上非常强。(RanketAI)


十三、最重要的升级:任务状态机

你应该给 Trellis 增加:

text
DRAFT GRILLED SPEC_LOCKED READY_FOR_CODEX IMPLEMENTING REVIEWING HUMAN_QA DONE

因为:

多 Agent 系统最大的敌人不是模型能力。

而是:

text
state ambiguity

十四、最终形态(这是最强组合)

你真正想构建的是:

text
Claude Opus = Architect Codex GPT-5.5 = Senior Implementer Trellis = Shared Operating System grill-with-docs = Requirement Distillation Engine

这其实已经接近:

text
AI-native software organization

而不是:

text
AI coding assistant

了。


推荐直接看的源码入口:

Поделиться этим Q&A