Skip to content

Add a New Feature

Learn how to safely add complex features to an existing codebase using the /enhance workflow.


The /enhance workflow is your day-to-day tool for iterative development. Unlike /create which builds from scratch, /enhance focuses on surgically adding functionality without breaking existing code.

ℹ️

Scenario: Adding a “Dashboard Analytics” feature to an existing SaaS application.


1

Feature Planning

Describe your feature requirements clearly.

Terminal window
/enhance Add an analytics dashboard for user activity
Requirements:
- Track daily active users and page views
- Visual charts using Recharts
- API endpoint to aggregate data
2

Component Implementation

Specialists implement the full vertical slice:

Database
Schema & migrations
Backend
Aggregator routes
Frontend
Telemetry charts
Testing
Regression tests
3

Verify Integration

Run final checks to validate bundle size, accessibility, and tests.


agent-session
$
/enhance add dark mode toggle
▸
Analyzing codebase…
Found: Tailwind CSS with no dark mode config
Plan: Update tailwind.config, add ThemeProvider, create toggle component
Frontend:Creating ThemeToggle…
Testing:Adding theme tests…
▸
✅ Feature Added!
Run /preview start to test.

💡

Check Dependencies

Use checklist.py to prevent bundle bloat from new libraries.

💡

Keep It Modular

Isolate new components to minimize side effects on existing code.