prompt-plus-plus-mcp
Version:
Advanced MCP server with 44+ metaprompt strategies including AI Core Principles, Vibe Coding Rules, and metadata-driven intelligent selection
11 lines • 5.59 kB
JSON
{
"name": "Follow Existing Patterns",
"description": "Maintain consistency by following established patterns in the codebase. Reduces cognitive load, prevents architecture drift, and ensures team cohesion.",
"template": "You are an AI assistant implementing the 'Follow Existing Patterns' principle from the Vibe Coding Rules. Your task is to identify, understand, and consistently apply existing patterns while knowing when to evolve them.\n\nFollow this pattern recognition and application framework:\n\n1. **Pattern Discovery**:\n - Code structure patterns\n - Naming conventions\n - Architecture patterns\n - Testing patterns\n - Error handling patterns\n - Documentation patterns\n\n2. **Pattern Analysis**:\n - **Intent**: Why the pattern exists\n - **Implementation**: How it's applied\n - **Consistency**: How well it's followed\n - **Evolution**: How it's changed over time\n - **Effectiveness**: Whether it's working\n - **Alternatives**: Other approaches considered\n\n3. **Pattern Categories**:\n - **Structural**: File organization, modules\n - **Behavioral**: Error handling, logging\n - **Creational**: Object construction, DI\n - **Architectural**: Layers, services\n - **Testing**: Test structure, mocking\n - **Operational**: Deployment, config\n\n4. **Consistency Application**:\n - When to follow exactly\n - When to adapt slightly\n - When to propose changes\n - How to document deviations\n - Migration strategies\n\n5. **Pattern Documentation**:\n - Implicit vs explicit patterns\n - Creating pattern guides\n - Example implementations\n - Anti-pattern warnings\n - Evolution guidelines\n\n6. **Team Alignment**:\n - Pattern communication\n - Onboarding materials\n - Code review focus\n - Refactoring priorities\n - Knowledge sharing\n\nInitial prompt: [Insert initial prompt here]\n\nPlease provide your response in the following JSON format:\n\n<json>\n{\n \"initial_prompt\": \"The original prompt provided\",\n \"codebase_analysis\": {\n \"project_age\": \"New/Mature/Legacy\",\n \"team_size\": \"Solo/Small/Large\",\n \"consistency_level\": \"High/Medium/Low\",\n \"documentation_quality\": \"Excellent/Good/Poor\",\n \"pattern_evolution\": \"Static/Evolving/Chaotic\"\n },\n \"discovered_patterns\": [\n {\n \"pattern_type\": \"Structural/Behavioral/Architectural\",\n \"pattern_name\": \"Descriptive name\",\n \"examples_found\": [\n {\n \"location\": \"File or module\",\n \"implementation\": \"How it's done\",\n \"quality\": \"Good/Acceptable/Poor\"\n }\n ],\n \"consistency_score\": \"1-10\",\n \"documentation_status\": \"Documented/Implicit/Unknown\"\n }\n ],\n \"pattern_effectiveness\": [\n {\n \"pattern\": \"Pattern name\",\n \"strengths\": [\"What works well\"],\n \"weaknesses\": [\"What causes friction\"],\n \"team_sentiment\": \"Love/Tolerate/Dislike\",\n \"evolution_needed\": \"Yes/No\",\n \"proposed_improvements\": [\"Enhancement idea\"]\n }\n ],\n \"implementation_guidelines\": [\n {\n \"context\": \"When implementing X\",\n \"pattern_to_follow\": \"Specific pattern\",\n \"example_code\": \"Reference implementation\",\n \"common_mistakes\": [\"What to avoid\"],\n \"validation_checklist\": [\"Consistency check\"]\n }\n ],\n \"pattern_conflicts\": [\n {\n \"conflict\": \"Competing patterns found\",\n \"pattern_a\": \"First approach\",\n \"pattern_b\": \"Second approach\",\n \"recommendation\": \"Which to use when\",\n \"migration_path\": \"How to consolidate\"\n }\n ],\n \"documentation_needs\": [\n {\n \"pattern\": \"Undocumented pattern\",\n \"priority\": \"High/Medium/Low\",\n \"documentation_type\": \"README/Wiki/Comments\",\n \"content_outline\": [\"What to include\"],\n \"examples_needed\": \"Number of examples\"\n }\n ],\n \"evolution_strategy\": {\n \"patterns_to_keep\": [\"Working well\"],\n \"patterns_to_evolve\": [\n {\n \"current\": \"Existing pattern\",\n \"target\": \"Improved version\",\n \"migration_steps\": [\"How to transition\"],\n \"timeline\": \"Gradual/Sprint/BigBang\"\n }\n ],\n \"patterns_to_retire\": [\n {\n \"pattern\": \"Outdated approach\",\n \"reason\": \"Why remove it\",\n \"replacement\": \"What to use instead\",\n \"deprecation_plan\": \"How to phase out\"\n }\n ]\n },\n \"team_alignment_plan\": [\n {\n \"action\": \"Pattern workshop/Documentation/Pairing\",\n \"purpose\": \"Share knowledge\",\n \"participants\": \"Who should attend\",\n \"frequency\": \"One-time/Regular\",\n \"expected_outcome\": \"Aligned understanding\"\n }\n ],\n \"consistency_metrics\": {\n \"current_consistency\": \"60% following patterns\",\n \"target_consistency\": \"90% adherence\",\n \"measurement_method\": \"Code analysis tools\",\n \"improvement_tracking\": \"Monthly review\"\n },\n \"key_insights\": [\n \"Critical pattern missing documentation\",\n \"Effective pattern worth spreading\",\n \"Conflicting patterns causing confusion\"\n ],\n \"recommendation\": \"Specific pattern adherence strategy with priorities\"\n}\n</json>",
"examples": [
"Add new feature to existing architecture",
"Implement API endpoint following conventions",
"Create new component matching style guide",
"Add tests following team patterns"
]
}