Trellis
English | 中文
AI capabilities grow like ivy — full of vitality but climbing in all directions. Trellis provides the structure to guide them along a disciplined path.
Based on Anthropic's Effective Harnesses for Long-Running Agents, with engineering practices and improvements for real-world usage.
Installation
pnpm install -g @mind-fold/trellis
npm install -g @mind-fold/trellis
Quick Start
trellis init
tl init
trellis init -u your-name
trellis init --cursor
trellis init --claude
trellis init --cursor --claude
What It Does
Trellis creates a structured workflow system in your project:
your-project/
├── .trellis/
│ ├── .developer # Developer identity (gitignored)
│ ├── workflow.md # Workflow guide
│ ├── agent-traces/ # Session tracking
│ │ └── {developer}/ # Per-developer progress
│ │ ├── index.md # Progress index
│ │ ├── features/ # Feature tracking
│ │ │ ├── {day}-{name}/ # Feature directory
│ │ │ │ └── feature.json
│ │ │ └── archive/ # Completed features
│ │ └── progress-N.md # Session records
│ ├── structure/ # Development guidelines
│ │ ├── frontend/ # Frontend standards
│ │ ├── backend/ # Backend standards
│ │ └── guides/ # Thinking guides
│ └── scripts/ # Utility scripts
│ ├── common/ # Shared utilities
│ │ ├── paths.sh # Path utilities
│ │ ├── developer.sh # Developer management
│ │ └── git-context.sh # Git context
│ ├── feature.sh # Feature management
│ ├── add-session.sh # Record sessions
│ ├── get-context.sh # Get session context
│ ├── get-developer.sh # Get developer name
│ └── init-developer.sh # Initialize developer
├── .cursor/commands/ # Cursor slash commands
├── .claude/commands/ # Claude Code slash commands
├── init-agent.md # AI onboarding guide
└── AGENTS.md # Agent instructions
Key Features
1. Multi-Developer Support
Each developer (human or AI) gets their own progress tracking:
./.trellis/scripts/init-developer.sh <name>
2. Slash Commands
Pre-built commands for AI assistants:
/init-agent | Initialize AI session with context |
/before-frontend-dev | Read frontend guidelines before coding |
/before-backend-dev | Read backend guidelines before coding |
/check-frontend | Validate frontend code against guidelines |
/check-backend | Validate backend code against guidelines |
/check-cross-layer | Verify cross-layer consistency |
/finish-work | Pre-commit checklist |
/record-agent-flow | Record session progress |
/break-loop | Deep bug analysis |
/onboard-developer | Full workflow onboarding |
3. Thinking Guides
Structured guides to prevent common mistakes:
- Cross-layer thinking guide
- Code reuse thinking guide
- Pre-implementation checklist
4. Feature Tracking
Track features with directory-based structure:
./.trellis/scripts/feature.sh create my-feature
./.trellis/scripts/feature.sh list
./.trellis/scripts/feature.sh archive my-feature
CLI Commands
trellis init
trellis init -u <name>
trellis init -y
trellis init -f
trellis init -s
How It Works
- AI reads
init-agent.md at session start
- Follows guidelines in
.trellis/structure/
- Updates progress in
.trellis/agent-traces/
- Uses slash commands for common tasks
This creates a structured, documented workflow where:
- AI agents maintain context across sessions
- Work is tracked and auditable
- Code quality standards are enforced
- Multiple agents can collaborate
Acknowledgments
Trellis is built upon ideas and inspirations from:
License
FSL-1.1-MIT (Functional Source License, MIT future license)
Copyright © Mindfold LLC