.agents/skills/onboard/SKILL.md
Interactive three-part onboarding for new team members to the Trellis AI-assisted workflow system. Covers core philosophy (AI memory, project-specific knowledge, context drift), system structure and command deep-dives, real-world workflow examples, and guideline customization. Use when a new developer joins the project, someone needs to understand the Trellis workflow, or project guidelines need initial setup.
npx skillsauth add basui01/agentflow onboardInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a senior developer onboarding a new team member to this project's AI-assisted workflow system.
YOUR ROLE: Be a mentor and teacher. Don't just list steps - EXPLAIN the underlying principles, why each skill exists, what problem it solves at a fundamental level.
This onboarding has THREE equally important parts:
PART 1: Core Concepts (Sections: CORE PHILOSOPHY, SYSTEM STRUCTURE, SKILL DEEP DIVE)
PART 2: Real-World Examples (Section: REAL-WORLD WORKFLOW EXAMPLES)
PART 3: Customize Your Development Guidelines (Section: CUSTOMIZE YOUR DEVELOPMENT GUIDELINES)
DO NOT skip any part. All three parts are essential:
After completing ALL THREE parts, ask the developer about their first task.
AI-assisted development has three fundamental challenges:
Every AI session starts with a blank slate. Unlike human engineers who accumulate project knowledge over weeks/months, AI forgets everything when a session ends.
The Problem: Without memory, AI asks the same questions repeatedly, makes the same mistakes, and can't build on previous work.
The Solution: The .trellis/workspace/ system captures what happened in each session - what was done, what was learned, what problems were solved. The $start skill reads this history at session start, giving AI "artificial memory."
AI models are trained on millions of codebases - they know general patterns for React, TypeScript, databases, etc. But they don't know YOUR project's conventions.
The Problem: AI writes code that "works" but doesn't match your project's style. It uses patterns that conflict with existing code. It makes decisions that violate unwritten team rules.
The Solution: The .trellis/spec/ directory contains project-specific guidelines. The $before-*-dev skills inject this specialized knowledge into AI context before coding starts.
Even after injecting guidelines, AI has limited context window. As conversation grows, earlier context (including guidelines) gets pushed out or becomes less influential.
The Problem: AI starts following guidelines, but as the session progresses and context fills up, it "forgets" the rules and reverts to generic patterns.
The Solution: The $check-* skills re-verify code against guidelines AFTER writing, catching drift that occurred during development. The $finish-work skill does a final holistic review.
.trellis/
|-- .developer # Your identity (gitignored)
|-- workflow.md # Complete workflow documentation
|-- workspace/ # "AI Memory" - session history
| |-- index.md # All developers' progress
| +-- {developer}/ # Per-developer directory
| |-- index.md # Personal progress index
| +-- journal-N.md # Session records (max 2000 lines)
|-- tasks/ # Task tracking (unified)
| +-- {MM}-{DD}-{slug}/ # Task directory
| |-- task.json # Task metadata
| +-- prd.md # Requirements doc
|-- spec/ # "AI Training Data" - project knowledge
| |-- frontend/ # Frontend conventions
| |-- backend/ # Backend conventions
| +-- guides/ # Thinking patterns
+-- scripts/ # Automation tools
frontend/ - Single-layer frontend knowledge:
backend/ - Single-layer backend knowledge:
guides/ - Cross-layer thinking guides:
WHY IT EXISTS: When a human engineer joins a project, they spend days/weeks learning: What is this project? What's been built? What's in progress? What's the current state?
AI needs the same onboarding - but compressed into seconds at session start.
WHAT IT ACTUALLY DOES:
workspace/ (what happened before?)WHY THIS MATTERS:
WHY IT EXISTS: AI models have "pre-trained knowledge" - general patterns from millions of codebases. But YOUR project has specific conventions that differ from generic patterns.
WHAT IT ACTUALLY DOES:
get_context.py --mode packages and reads relevant guidelinesWHY THIS MATTERS:
WHY IT EXISTS: AI context window has limited capacity. As conversation progresses, guidelines injected at session start become less influential. This causes "context drift."
WHAT IT ACTUALLY DOES:
WHY THIS MATTERS:
WHY IT EXISTS: Most bugs don't come from lack of technical skill - they come from "didn't think of it":
WHAT IT ACTUALLY DOES:
WHY IT EXISTS:
The $check-* skills focus on code quality within a single layer. But real changes often have cross-cutting concerns.
WHAT IT ACTUALLY DOES:
WHY IT EXISTS:
All the context AI built during this session will be lost when session ends. The next session's $start needs this information.
WHAT IT ACTUALLY DOES:
workspace/{developer}/journal-N.md[1/8] $start - AI needs project context before touching code [2/8] python3 ./.trellis/scripts/task.py create "Fix bug" --slug fix-bug - Track work for future reference [3/8] $before-dev - Inject project-specific development guidelines [4/8] Investigate and fix the bug - Actual development work [5/8] $check - Re-verify code against guidelines [6/8] $finish-work - Holistic cross-layer review [7/8] Human tests and commits - Human validates before code enters repo [8/8] $record-session - Persist memory for future sessions
[1/4] $start - Context needed even for non-coding work [2/4] python3 ./.trellis/scripts/task.py create "Planning task" --slug planning-task - Planning is valuable work [3/4] Review docs, create subtask list - Actual planning work [4/4] $record-session (with --summary) - Planning decisions must be recorded
[1/6] $start - Resume context from previous session [2/6] $before-dev - Re-inject guidelines before fixes [3/6] Fix each CR issue - Address feedback with guidelines in context [4/6] $check - Verify fixes did not introduce new issues [5/6] $finish-work - Document lessons from CR [6/6] Human commits, then $record-session - Preserve CR lessons
[1/5] $start - Clear baseline before major changes [2/5] Plan phases - Break into verifiable chunks [3/5] Execute phase by phase with $check- after each* - Incremental verification [4/5] $finish-work - Check if new patterns should be documented [5/5] Record with multiple commit hashes - Link all commits to one feature
[1/6] $start - See if this bug was investigated before [2/6] $before-dev - Guidelines might document known gotchas [3/6] Investigation - Actual debugging work [4/6] $check - Verify debug changes do not break other things [5/6] $finish-work - Debug findings might need documentation [6/6] Human commits, then $record-session - Debug knowledge is valuable
$before-*-dev skills inject project knowledge.$check-* skills catch context drift.After explaining Part 1 and Part 2, check if the project's development guidelines need customization.
Check if .trellis/spec/ contains empty templates or customized guidelines:
# Check if files are still empty templates (look for placeholder text)
grep -l "To be filled by the team" .trellis/spec/backend/*.md 2>/dev/null | wc -l
grep -l "To be filled by the team" .trellis/spec/frontend/*.md 2>/dev/null | wc -l
Situation A: First-time setup (empty templates)
If guidelines are empty templates (contain "To be filled by the team"), this is the first time using Trellis in this project.
Explain to the developer:
"I see that the development guidelines in .trellis/spec/ are still empty templates. This is normal for a new Trellis setup!
The templates contain placeholder text that needs to be replaced with YOUR project's actual conventions. Without this, $before-*-dev skills won't provide useful guidance.
Your first task should be to fill in these guidelines:
For example, for .trellis/spec/backend/database-guidelines.md:
Would you like me to help you analyze your codebase and fill in these guidelines?"
Situation B: Guidelines already customized
If guidelines have real content (no "To be filled" placeholders), this is an existing setup.
Explain to the developer:
"Great! Your team has already customized the development guidelines. You can start using $before-*-dev skills right away.
I recommend reading through .trellis/spec/ to familiarize yourself with the team's coding standards."
If the developer wants help filling guidelines, create a feature to track this:
python3 ./.trellis/scripts/task.py create "Fill spec guidelines" --slug fill-spec-guidelines
Then systematically analyze the codebase and fill each guideline file:
Work through one file at a time:
backend/directory-structure.mdbackend/database-guidelines.mdbackend/error-handling.mdbackend/quality-guidelines.mdbackend/logging-guidelines.mdfrontend/directory-structure.mdfrontend/component-guidelines.mdfrontend/hook-guidelines.mdfrontend/state-management.mdfrontend/quality-guidelines.mdfrontend/type-safety.mdAfter covering all three parts, summarize:
"You're now onboarded to the Trellis workflow system! Here's what we covered:
Next steps (tell user):
$record-session to record this onboard session.trellis/spec/ guidelinesWhat would you like to do first?"
development
Multi-agent pipeline orchestrator that plans and dispatches parallel development tasks to worktree agents. Reads project context, configures task directories with PRDs and jsonl context files, and launches isolated coding agents. Use when multiple independent features need parallel development, orchestrating worktree agents, or managing multi-agent coding pipelines.
development
Captures executable contracts and coding knowledge into .trellis/spec/ documents after implementation, debugging, or design decisions. Enforces code-spec depth for infra and cross-layer changes with mandatory sections for signatures, contracts, validation matrices, and test points. Use when a feature is implemented, a bug is fixed, a design decision is made, a new pattern is discovered, or cross-layer contracts change.
development
Initializes an AI development session by reading workflow guides, developer identity, git status, active tasks, and project guidelines from .trellis/. Classifies incoming tasks and routes to brainstorm, direct edit, or task workflow. Use when beginning a new coding session, resuming work, starting a new task, or re-establishing project context.
development
Records completed work progress to .trellis/workspace/ journal files after human testing and commit. Captures session summaries, commit hashes, and updates developer index files for future session context. Use when a coding session is complete, after the human has committed code, or to persist session knowledge for future AI sessions.