trellis
CLAUDE.md2 starsChanged 9 months agoMITView on GitHub
Trellis is a Claude Code plugin for spec-driven development. It provides 11 composable skills that take a feature from problem framing through implementation. Every feature goes through structured phases. Each phase produces a durable markdown artifact in the specs directory (.specs/ by default, configurable via trellis.json). Downstream phases inherit upstream artifacts — the spec references the pitch, the plan references the spec, tasks reference the plan, and implementation follows the tasks.
In this repository18 other files it gives its agents.
- checkSkill
- lintSkill
- testSkill
- versionSkill
- trellis:buildSkill
- build-with-subagentsSkill
- build-with-batchSkill
- trellis:clarifySkill
- trellis:complianceSkill
- trellis:guidelinesSkill
- trellis:initSkill
- trellis:pitchSkill
- trellis:planSkill
- trellis:prepSkill
- trellis:runSkill
- trellis:sketchSkill
- trellis:specSkill
- trellis:statusSkill
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 44
Test-writer per task: Before implementation, should-write-tests.py (deterministic heuristic) decides if the test-writer agent should run.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Trellis — Plugin Context
Trellis is a Claude Code plugin for spec-driven development. It provides 11 composable skills that take a feature from problem framing through implementation.
Philosophy
Every feature goes through structured phases. Each phase produces a durable markdown artifact in the specs directory (.specs/ by default, configurable via trellis.json). Downstream phases inherit upstream artifacts — the spec references the pitch, the plan references the spec, tasks reference the plan, and implementation follows the tasks.
Skill relationships
Setup: init ───────────────────────────────────────────────────┐
│
Foundation: guidelines ─────────────────────────────────────────────┤
sketch ─────────────────────────┐ │
│ │
Pipeline: pitch → spec → plan → build │
│ │ │ │ │
└───────┴──────┴────────┘ │
↑ all inherit from guidelines ────────────────┘
Folded into parent stages:
init ← automatically runs guidelines after setup
plan ← automatically runs clarify + compliance as pre-steps
build ← automatically runs prep if tasks.json is missing
Orchestration: run (pitch → spec → plan → build, with review gates)- Init creates
trellis.jsonand the specs directory, then runs guidelines — the entry point for new projects - Guidelines and Sketch are foundational — run before starting a feature pipeline
- Pitch → Spec → Plan → Build is the 4-stage pipeline, each building on the previous
- Clarify and Compliance run automatically as pre-steps of
/plan(can also be invoked standalone) - Prep runs automatically as a pre-step of
/build(can also be invoked standalone) - Run orchestrates all 4 stages with review gates (approve/edit/redo) after each document stage
- Build executes tasks through a check-driven feedback loop with an optional test-writer (TDD) and LLM judge
Key design decisions
context: fork: Clarify and Compliance run in isolated contexts. They cannot ask the user questions mid-run. The plan skill (which runs them as pre-steps) ensures any user-provided context is embedded in the spec's §9/§10 before invoking forked skills.{specsDir}/{feature}/tasks.json: Single file serving as both task definition and execution state. Generated by/trellis:prep, updated in-place during implementation. Re-running/trellis:prepoverwrites tasks.json, resetting all status to "pending". Each feature has its own tasks.json, enabling parallel implementations. If the user jumps straight from plan to build, the build skill auto-detects the missing tasks.json and runs prep first.- Single check command: A CLI chain (e.g.,
npm run lint && npm run typecheck && npm test) that replaces the old oracle pipeline. Configured in guidelines.md, propagated to tasks.json. The&&chain provides stop-on-failure for free. - Ralph mode (Docker): Each task runs in a fresh Claude Code context inside a Docker container with
--dangerously-skip-permissions. Docker is the security boundary. The loop script (scripts/ralph-loop.sh) does ALL orchestration — it assembles prompts from templates (scripts/templates/) viaassemble-prompt.pyand sends them toclaude -pdirectly. The build skill is NOT invoked inside Docker. The check command runs on the HOST using the host's toolchain. Supports--stream,--tail,--no-judge, and--no-polishoutput modes. - Test-writer per task: Before implementation,
should-write-tests.py(deterministic heuristic) decides if the test-writer agent should run. Behavioral tasks get tests; structural tasks skip. This makescheckmeaningful because it includes tests. - Judge at end: Runs once after all tasks complete (default-on, opt-out with
--no-judge). Evaluates intent alignment — did you build what the spec asked for, not just what the tasks described. - Post-judge redefiner: After the judge, if tasks are blocked or the verdict is PARTIAL/FAIL, the redefiner agent reads failure logs, diagnoses root causes (convention mismatch, environment limitation, logic error, test fragility), rewrites blocked task
dofields with lessons learned, and adds new tasks for judge-identified gaps. Blocked tasks are reset to pending and the task loop re-executes. Maximum 3 redefinition passes before escalating to the user. Runs as an LLM agent in Docker (same as builder/judge) because diagnosis and rewriting require natural language reasoning. - Post-judge polish phase: After the build is functionally complete (or redefinition limit reached), two review agents run sequentially: the optimizer identifies localized performance/simplification opportunities (no architectural changes), and the improver reviews build logs for robustness improvements (fragile patterns, edge case gaps, thin error handling). Each creates up to 5 new tasks and appends auto-generated sections to plan.md (§11 and §12). Tasks include a
"source"field for traceability. If new tasks are created, they're executed in one final pass. Opt-out with--no-polish. - Agents: Generation agents (pitcher, specifier, planner, task-writer, guideliner, sketcher, optimizer, improver) run on Sonnet for cost-efficient document generation. Judge and Test Writer run on Opus for analytical tasks. All defined in
agents/and spawned by their parent skills. - Scripts: Deterministic work (prereq validation, marker extraction, pipeline status, prompt assembly, test-writer heuristic, task status updates) lives in
scripts/as standalone Python scripts that output JSON. Skills call these in pre-flight; the ralph loop calls them for orchestration. - Hooks: Python-based validators in
hooks/for spec structure, ambiguity markers, task status, and session startup status. Two-layer architecture: hooks handle orchestration (stdin JSON, relevance filtering, formatting), scripts handle data processing. trellis.json: Stores the configured specs directory (specsDir). Created by/trellis:init. All skills and hooks read from it, falling back to.specs/if absent.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

