trellis-meta
npx skills add https://github.com/mindfold-ai/trellis --skill trellis-meta
Agent 安装分布
Skill 文档
Trellis Meta-Skill
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. Run
trellis --versionto check.
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 |
claude --resume |
â Full | â None | â³ TBD |
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)
All features work as documented. Hooks provide automatic context injection and quality enforcement.
Cursor (Partial Support)
- 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
OpenCode (Future Consideration)
- Need to evaluate OpenCode’s extension/hook capabilities
- May require adapter layer for hook compatibility
- Core file-based systems should work once integrated
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 â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
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 (trellis-local), keeping this meta-skill as the authoritative reference for vanilla Trellis.
Skill 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 here
Why this separation?
- User may have multiple projects with different Trellis customizations
- Each project’s
trellis-localskill tracks ITS OWN modifications - The meta-skill remains clean as the reference for original Trellis
- Enables easy upgrades: compare meta-skill with new Trellis version
Self-Iteration Protocol
When modifying Trellis for a project, follow this protocol:
1. Check for Existing Project Skill
# Look for project-local skill
ls -la .claude/skills/trellis-local/
2. Create Project Skill if Missing
If no trellis-local exists, create it:
mkdir -p .claude/skills/trellis-local
Then create .claude/skills/trellis-local/SKILL.md:
---
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 Local - [PROJECT_NAME]
## Base Version
Trellis version: X.X.X (from package.json or trellis --version)
Date initialized: YYYY-MM-DD
## Customizations
### Commands Added
(none yet)
### Agents Modified
(none yet)
### Hooks Changed
(none yet)
### Specs Customized
(none yet)
### Workflow Changes
(none yet)
---
## Changelog
### YYYY-MM-DD
- Initial setup
3. Record Every Modification
When making ANY change to Trellis, update trellis-local/SKILL.md:
Example: Adding a new command
### Commands Added
#### /trellis:my-command
- **File**: `.claude/commands/trellis/my-command.md`
- **Purpose**: [what it does]
- **Added**: 2026-01-31
- **Why**: [reason for adding]
Example: Modifying a hook
### Hooks Changed
#### inject-subagent-context.py
- **Change**: Added support for `my-agent` type
- **Lines modified**: 45-67
- **Date**: 2026-01-31
- **Why**: [reason]
4. Never Modify Meta-Skill for Project Changes
The trellis-meta skill should ONLY be updated when:
- Trellis releases a new version
- Fixing documentation errors in the original
- Adding missing documentation for original features
Architecture Overview
Trellis transforms AI assistants into structured development partners through enforced context injection.
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) â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
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 |
Core Components
1. Workspace System
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: .trellis/.developer (identity), journals (session history)
2. Task System
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
3. Spec System
Maintain coding standards that get injected to agents.
.trellis/spec/
âââ frontend/ # Frontend guidelines
âââ backend/ # Backend guidelines
âââ guides/ # Thinking guides
4. Hooks System
Automatically inject context and enforce quality.
| Hook | When | Purpose |
|---|---|---|
SessionStart |
Session begins | Inject workflow, guidelines |
PreToolUse:Task |
Before sub-agent | Inject specs via JSONL |
SubagentStop:check |
Check agent stops | Enforce verification (Ralph Loop) |
5. Agent System
Specialized agents for different phases.
| Agent | Purpose | Restriction |
|---|---|---|
dispatch |
Orchestrate pipeline | Pure dispatcher |
plan |
Evaluate requirements | Can reject unclear reqs |
research |
Find code patterns | Read-only |
implement |
Write code | No git commit |
check |
Review and self-fix | Ralph Loop controlled |
debug |
Fix issues | Precise fixes only |
6. Multi-Agent Pipeline
Run parallel isolated sessions via Git worktrees.
plan.py â start.py â Dispatch â implement â check â create-pr
Customization Guide
Adding a Command
- Create
.claude/commands/trellis/my-command.md - Update
trellis-localskill with the change
Adding an Agent
- Create
.claude/agents/my-agent.mdwith YAML frontmatter - Update
inject-subagent-context.pyto handle new agent type - Create
my-agent.jsonlin task directories - Update
trellis-localskill
Modifying Hooks
- Edit the hook script in
.claude/hooks/ - Document the change in
trellis-localskill - Note which lines were modified and why
Extending Specs
- Create new category in
.trellis/spec/my-category/ - Add
index.mdand guideline files - Reference in JSONL context files
- Update
trellis-localskill
Changing Task Workflow
- Modify
next_actionarray intask.json - Update dispatch or hook scripts as needed
- Document in
trellis-localskill
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
core/ – All Platforms
| Document | Content |
|---|---|
overview.md |
Core systems introduction |
files.md |
All .trellis/ files with purposes |
workspace.md |
Workspace system, journals, developer identity |
tasks.md |
Task system, directories, JSONL context files |
specs.md |
Spec system, guidelines organization |
scripts.md |
Platform-independent scripts |
claude-code/ – Claude Code Only
| Document | Content |
|---|---|
overview.md |
Claude Code features introduction |
hooks.md |
Hook system, context injection |
agents.md |
Agent types, invocation, Task tool |
ralph-loop.md |
Quality enforcement mechanism |
multi-session.md |
Parallel worktree sessions |
worktree-config.md |
worktree.yaml configuration |
scripts.md |
Claude Code only scripts |
how-to-modify/ – Modification Guides
| Document | Scenario |
|---|---|
overview.md |
Quick reference for all modifications |
add-command.md |
Adding slash commands |
add-agent.md |
Adding new agent types |
add-spec.md |
Adding spec categories |
add-phase.md |
Adding workflow phases |
modify-hook.md |
Modifying hook behavior |
change-verify.md |
Changing verify commands |
meta/ – Documentation
| Document | Content |
|---|---|
platform-compatibility.md |
Detailed platform support matrix |
self-iteration-guide.md |
How to document customizations |
trellis-local-template.md |
Template for project-local skill |
Quick Reference
Key Scripts
| Script | Purpose |
|---|---|
get_context.py |
Get session context |
task.py |
Task management |
add_session.py |
Record session |
multi_agent/start.py |
Start parallel agent |
Key Paths
| Path | Purpose |
|---|---|
.trellis/.developer |
Developer identity |
.trellis/.current-task |
Active task pointer |
.trellis/workflow.md |
Main workflow docs |
.claude/settings.json |
Hook configuration |
Upgrade Protocol
When upgrading Trellis to a new version:
- Compare new meta-skill with current
- Review changes in new version
- Check
trellis-localfor conflicts - Merge carefully, preserving customizations
- Update
trellis-localwith migration notes
## Changelog
### 2026-02-01 - Upgraded to Trellis X.Y.Z
- Merged new hook behavior from meta-skill
- Kept custom agent `my-agent`
- Updated check.jsonl template