Your First Task¶
Let's try the system with real examples to see how guardrails work in practice.
Example 1: Bug Fix (ATOMIC Mode)¶
Scenario: A button is misaligned on the profile page.
Your Prompt¶
What AI Does¶
- Deconstruct: Single file change, CSS/styling issue
- Diagnose: Check responsive breakpoints, flexbox/grid usage
- Develop: Apply fix, verify against design
- Deliver: Test, commit with conventional message
Expected Behavior¶
AI should:
- Locate the relevant component file
- Identify the styling issue
- Apply a minimal fix (no over-engineering)
- Keep the file under 200 lines (component guardrail)
- Suggest a commit:
fix(profile): align edit button on mobile screens
Example 2: Simple Feature (ATOMIC Mode)¶
Scenario: Add a "copy to clipboard" button.
Your Prompt¶
What AI Does¶
- Deconstruct: New button + click handler + feedback
- Diagnose: Check existing button patterns, clipboard API support
- Develop: Implement with proper error handling
- Deliver: Add test, validate, commit
Expected Behavior¶
AI should:
- Use existing button component (if available)
- Handle clipboard API errors gracefully
- Show user feedback (toast/tooltip)
- Follow TypeScript strict mode (no
any) - Add unit test for the click handler
- Commit:
feat(settings): add copy-to-clipboard for API key
Example 3: Multi-File Feature (FEATURE Mode)¶
Scenario: Add user avatar upload.
Your Prompt¶
What AI Does¶
- Deconstruct: Break into subtasks
- File input component
- Preview component
- Validation logic
- Upload API call
- Error handling
- Diagnose: Check existing upload patterns, API endpoints
- Develop: Implement each subtask with tests
- Deliver: Integration test, document, commit each step
Expected Behavior¶
AI should:
- Break into 3-5 subtasks
- Implement sequentially (not all at once)
- Validate file type and size (security guardrail)
- Keep each file under 300 lines
- Add tests for validation logic
- Multiple commits, one per logical change
Example 4: Complex Feature (COMPLEX Mode)¶
Scenario: Build a notification system.
Your Prompt¶
@.claude/skills/create-prd/SKILL.md
Build a notification system with:
- In-app notifications
- Email notifications (optional)
- User preferences for notification types
What AI Does¶
- Asks clarifying questions (PRD workflow)
- Creates PRD in
.claude/tasks/ - Generates task breakdown (20-50 subtasks)
- Implements step-by-step with verification
Expected Behavior¶
AI should:
- Ask about notification types, delivery methods, storage
- Create PRD document with all sections
- Generate numbered task list
- Wait for approval before implementing
- Track progress in
.claude/state.md(if multi-session)
Verifying Guardrails Work¶
Security Check¶
Try this prompt:
AI should:
- Use parameterized queries (not string concatenation)
- Validate email input
- Handle errors properly
If AI writes WHERE email = '${email}', remind it: "Check security guardrails in CLAUDE.md"
Code Quality Check¶
Try this prompt:
AI should:
- Keep function under 50 lines
- Extract complex logic to helper functions
- Add type signatures
- No magic numbers
If the function exceeds 50 lines, AI should automatically refactor.
Testing Check¶
Try this prompt:
AI should:
- Create the function
- Create test file alongside
- Test edge cases (null, negative, large numbers)
- Aim for >80% coverage
Common Issues¶
AI Doesn't Follow Guardrails¶
Solution: Explicitly remind it
Follow the guardrails in CLAUDE.md. Specifically:
- Functions must be ≤50 lines
- All inputs must be validated
- Add tests for the new code
AI Skips Tests¶
Solution: Be explicit
AI Over-Engineers¶
Solution: Request simplicity
Keep this simple - minimal implementation that meets the requirements.
No extra features or "nice-to-haves".
AI Makes Large Commits¶
Solution: Request atomic commits
Practice Prompts¶
Try these prompts to get comfortable with the system:
Beginner¶
- "Fix the typo in the README.md file"
- "Add a loading spinner to the submit button"
- "Update the copyright year in the footer"
Intermediate¶
- "Add form validation to the contact form (email required, message min 10 chars)"
- "Create a dark mode toggle that persists to localStorage"
- "Add pagination to the blog posts list"
Advanced¶
- "Refactor the API service to use a base HTTP client class"
- "Add rate limiting to the public API endpoints"
- "@.claude/skills/create-prd/SKILL.md - Build a search feature with filters"
What You Learned¶
After completing these examples, you should understand:
- ATOMIC mode for small, focused changes
- FEATURE mode for multi-file features
- COMPLEX mode with PRD workflow for large features
- How guardrails are enforced automatically
- How to remind AI when guardrails aren't followed
Next Steps¶
-
Deep Dive into Guardrails
Understand all 35+ rules in detail.
-
Learn Workflows
Master PRD and task generation workflows.
-
Language Guide
Check your language-specific guide.