-
Notifications
You must be signed in to change notification settings - Fork 2
MEP Design Philosophy
github-actions[bot] edited this page Jun 26, 2026
·
5 revisions
The MEP (Minimal Effective Prompt) philosophy is the core design principle behind Sylphx Flow: Use the minimum prompt to achieve maximum effectiveness.
MEP = Minimal Effective Prompt
A design approach where AI assistants require minimal user input because they automatically access all necessary context through structured tools and systems.
// Traditional AI interaction - verbose, error-prone
User: "I'm working on a TypeScript + React + Next.js 14 App Router project.
The project structure is:
- src/app for routes
- src/components for React components
- src/lib for utilities
We're using:
- shadcn/ui for component library
- Tailwind CSS for styling
- Zod for validation
- tRPC for API
Current time is 2025-10-30 19:47
System: macOS on Apple Silicon
I want to implement a user authentication system with:
- JWT tokens
- Refresh token mechanism
- Secure cookie storage
- RBAC (Role-Based Access Control)
Please follow our existing code style and patterns,
make sure it's type-safe and well-tested..."
// Issues:
β Verbose - takes 5 minutes to write
β Error-prone - might forget important context
β Repetitive - same info needed every time
β Outdated - manually tracked time/env
β Incomplete - might miss patterns// MEP with Sylphx Flow - minimal, automatic
User: "implement authentication"
// AI automatically gets everything via MCP:
β
Project environment (detected)
β
Tech stack (via codebase search)
β
Current time (via time tools)
β
System info (via hook command)
β
Existing patterns (via codebase search)
β
Best practices (via knowledge base)
β
Code style (from actual codebase)
// Result: Same or better output, 90% less input// Via hook command - AI knows automatically:
{
platform: "darwin",
arch: "arm64",
cpu: "10 cores",
memory: "24 GB",
currentTime: "2025-10-30 19:47:17",
workingDirectory: "/Users/kyle/project",
nodeVersion: "v20.0.0",
packageManager: "bun"
}// Via codebase search - AI discovers:
- Tech stack: React + Next.js + TypeScript
- UI library: shadcn/ui
- Styling: Tailwind CSS
- State management: Zustand
- API layer: tRPC
- Database: Prisma + PostgreSQL
- Testing: Vitest + Testing Library// Via knowledge base - AI references:
- React patterns and hooks
- Next.js App Router best practices
- Authentication security guidelines
- TypeScript type-safety patterns
- Testing strategiesMEP is enabled by composing multiple MCP tools:
// User types minimal prompt
User: "implement authentication"
// AI orchestrates tools automatically
async function handlePrompt(userInput: string) {
// 1. Get system context (from hooks automatically)
const systemInfo = getSessionContext();
const time = await time_get_current();
// 2. Search knowledge for best practices
const authGuidelines = await knowledge_search("authentication security");
// 3. Search codebase for existing patterns
const existingAuth = await codebase_search("authentication implementation");
const codeStyle = await codebase_search("code patterns and style");
// 4. Synthesize context
const fullContext = {
environment: systemInfo,
time: time,
bestPractices: authGuidelines,
existingCode: existingAuth,
codeStyle: codeStyle
};
// 5. Generate implementation with full context
return generateCode(userInput, fullContext);
}
// All automatic - user just typed 3 words!MEP builds context progressively as the conversation continues:
// First interaction
User: "implement authentication"
AI: [Gets all context β Implements auth system]
// Second interaction
User: "add password reset"
AI: [Already has context from before + searches for reset patterns β Adds feature]
// Third interaction
User: "add email verification"
AI: [Builds on previous context β Adds verification]
// Each subsequent prompt is even more minimal!| Aspect | Traditional | MEP (Sylphx Flow) |
|---|---|---|
| User Input | 500+ words | 3-10 words |
| Context Accuracy | Manual, error-prone | Automatic, accurate |
| Time to Prompt | 5+ minutes | 10 seconds |
| Consistency | Varies per prompt | Always complete |
| Maintenance | Update every prompt | Zero maintenance |
| Learning Curve | Need to know what to include | Just describe task |
| Project Awareness | Manual specification | Automatic detection |
| Best Practices | Must research first | Built-in knowledge |
Traditional:
I need to implement a user profile page. The project uses:
- Next.js 14 with App Router
- TypeScript for type safety
- shadcn/ui components
- Tailwind for styling
- tRPC for API calls
- Zod for validation
The page should:
- Display user information (name, email, avatar)
- Allow editing profile
- Handle form validation
- Show loading states
- Handle errors gracefully
- Follow our existing patterns in src/app/(dashboard)/settings
Make sure to:
- Use server components where possible
- Client components only when needed
- Proper TypeScript types
- Follow our code style
- Add proper error boundaries
MEP (Sylphx Flow):
implement user profile page
Traditional:
Please review this authentication code for:
- Security vulnerabilities (SQL injection, XSS, CSRF)
- Performance issues
- Type safety
- Error handling
- Best practices
- Code style consistency
- Test coverage
- Documentation
Consider:
- We use JWT with refresh tokens
- PostgreSQL database
- bcrypt for password hashing
- Rate limiting needed
- Our style guide is in docs/STYLE_GUIDE.md
MEP (Sylphx Flow):
review for security and performance
Traditional:
Need to refactor this component to:
- Use React Server Components
- Split client/server logic
- Improve performance
- Add proper loading states
- Handle errors better
- Follow Next.js 14 patterns
- Keep TypeScript strict
- Maintain existing functionality
- Add tests
Current stack:
- Next.js 14 App Router
- React 18
- TypeScript 5
- Existing tests in Vitest
MEP (Sylphx Flow):
refactor to server components
// Time saved per interaction
Traditional: 5 minutes typing + 2 minutes thinking = 7 minutes
MEP: 10 seconds typing = 10 seconds
// In a typical day (20 AI interactions)
Traditional: 20 Γ 7 minutes = 140 minutes (2.3 hours)
MEP: 20 Γ 10 seconds = 3.3 minutes
// Productivity gain: 2+ hours per day// What developer needs to remember
Traditional:
- All project configuration
- Current tech stack
- Code style guidelines
- Security best practices
- Testing patterns
- Deployment process
// = High cognitive load
MEP:
- Just the task to accomplish
// = Minimal cognitive load// Context completeness
Traditional:
- Varies per developer
- Changes over time
- Easy to forget details
// = Inconsistent results
MEP:
- Always complete
- Always up-to-date
- Automatic detection
// = Consistent results// New developer experience
Traditional:
- Must learn what to include in prompts
- Must understand entire stack
- Must read all documentation
// = Slow onboarding (weeks)
MEP:
- Just describe what to do
- AI handles context
- Learn by doing
// = Fast onboarding (days)# Setup once
flow init
# Do everything
flow run "any task"
# No configuration needed between tasks// Every prompt automatically enhanced with:
interface AutoContext {
system: SystemInfo; // From hook command
time: TimeInfo; // From time tools
knowledge: Guidelines; // From knowledge base
codebase: Patterns; // From codebase search
style: StyleGuide; // From output styles
}
// User never needs to provide this// Context builds up over conversation
Prompt 1: "implement auth"
β AI gets: system + knowledge + codebase
Prompt 2: "add password reset"
β AI has: previous context + new searches
Prompt 3: "add tests"
β AI has: full feature context + test patterns
// Each prompt can be more minimal// Single user prompt triggers multiple tools
User: "implement feature X"
// AI automatically orchestrates:
Promise.all([
knowledge_search("feature X patterns"),
codebase_search("similar features"),
time_get_current(),
getSessionContext()
]).then(synthesize);
// User doesn't need to know about tools// Average prompt complexity
const traditionalPrompt = {
words: 150,
timeToCraft: "5 minutes",
contextAccuracy: "70%",
repetitiveness: "High",
maintenanceNeeded: "Yes"
};
// Developer experience
- Must remember project details
- Must specify all context
- Repetitive information
- Error-prone
- Time-consuming// Average prompt complexity
const mepPrompt = {
words: 5,
timeToCraft: "10 seconds",
contextAccuracy: "95%",
repetitiveness: "None",
maintenanceNeeded: "No"
};
// Developer experience
- Just describe the task
- Context automatic
- Zero repetition
- Accurate
- Fast// Measured improvements
const improvements = {
promptLength: "-90%",
timeToPrompt: "-97%",
contextAccuracy: "+25%",
cognitiveLoad: "-80%",
onboardingTime: "-70%",
consistency: "+30%"
};// Bad: Require configuration
User: Configure project settings
User: Set tech stack
User: Define code style
User: Now do the task
// Good: Auto-detect everything
User: Do the task
// [Everything detected automatically]// Bad: Put everything in prompt
const prompt = "Long detailed prompt with all context...";
// Good: Provide context through tools
const context = await getContext(); // Automatic
const prompt = "Minimal task description";// Bad: One big tool
function doEverything() { /* complex */ }
// Good: Compose small tools
const result = pipe(
getSystem,
searchKnowledge,
searchCodebase,
synthesize
);// Bad: Require all info upfront
User: [Huge detailed specification]
// Good: Build context progressively
User: "implement X"
AI: [Implements]
User: "add Y"
AI: [Adds to X, already has context]- β 90% less typing - Minimal prompts
- β 97% faster - Seconds vs minutes
- β Zero repetition - Context automatic
- β Lower cognitive load - Just describe task
- β Consistent results - Complete context every time
- β Faster onboarding - New devs productive immediately
- β Consistent quality - Same context for everyone
- β Shared knowledge - Knowledge base for all
- β Reduced errors - Automatic accurate context
- β Better understanding - Complete context
- β More accurate - Real project data
- β More helpful - Can find patterns
- β More consistent - Reliable information
Learn more about MEP implementation:
- Technical Architecture - How MEP is implemented
- Codebase Search - Automatic pattern detection
- Knowledge Base - Built-in best practices
- Agent Framework - Orchestrated execution
Last Updated: 2025-10-30 | Edit this page | Report Issues