بنقرة واحدة
onboard
PART 3: Customize Your Development Guidelines
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
PART 3: Customize Your Development Guidelines
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Read the backend development guidelines before starting your development task.
Read the frontend development guidelines before starting your development task.
Deep requirements and design discovery workflow that keeps Trellis task-first PRD capture but adds stronger design confirmation, explicit technical design notes, and a clean handoff to task plan generation. Use when you want a richer brainstorming experience than $brainstorm, when trade-offs need deliberate review, or when you want Superpowers-style design validation inside Trellis tasks.
Check if the code you just wrote follows the backend development guidelines.
Cross-Layer Check
Check if the code you just wrote follows the frontend development guidelines.
| name | onboard |
| description | PART 3: Customize Your Development Guidelines |
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:
.trellis/spec/frontend/ or .trellis/spec/backend/WHY 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-frontend-dev - Inject project-specific frontend knowledge [4/8] Investigate and fix the bug - Actual development work [5/8] $check-frontend - 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-backend-dev - Re-inject guidelines before fixes [3/6] Fix each CR issue - Address feedback with guidelines in context [4/6] $check-backend - Verify fixes didn't 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-backend-dev - Guidelines might document known gotchas [3/6] Investigation - Actual debugging work [4/6] $check-backend - Verify debug changes don't 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?"