forked from cardosofelipe/fast-next-template
feat(mcp): Prompt Management System #67
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
Implement a system for managing prompts as first-class engineering artifacts. Prompts are the "code" that instructs AI agents - they need versioning, testing, templating, and optimization just like any other code. This system prevents prompt drift, enables A/B testing, and allows model-specific optimizations.
Parent Epic
Why This Is Critical
The Problem
The Solution
A comprehensive prompt management system that:
Implementation Sub-Tasks
1. Project Setup & Architecture
backend/src/mcp_core/prompts/directory__init__.pywith public API exportsmanager.pywithPromptManagerclassconfig.pywith Pydantic settings2. Prompt Schema & Types
schema/prompt.pywith prompt definitionsPromptmodelSystemPromptfor agent personasTaskPromptfor specific tasksToolPromptfor tool descriptionsEvaluationPromptfor LLM-as-judgeChainPromptfor multi-step workflows3. Prompt Templating
templating/engine.pywith template engine4. Prompt Composition
composition/composer.pywith composition5. Prompt Versioning
versioning/manager.pywith version control6. Model-Specific Variants
variants/manager.pywith variant management7. Prompt Storage
storage/repository.pywith storage layer8. Prompt Registry
registry/registry.pywith prompt registry9. Prompt Optimization
optimization/optimizer.pywith optimization10. Prompt Testing
testing/tester.pywith prompt testing11. Prompt Analytics
analytics/collector.pywith analytics12. Prompt Validation
validation/validator.pywith validation13. Prompt Security
security/scanner.pywith security scanning14. MCP Integration
get_prompttool - Retrieve prompt by name/versionlist_promptstool - List available promptsrender_prompttool - Render with variablesvalidate_prompttool - Validate a promptget_prompt_statstool - Get prompt analyticssuggest_prompttool - Get prompt recommendations15. CLI & Admin Tools
cli/prompt_cli.pywith CLI commandsprompt listcommandprompt showcommandprompt validatecommandprompt testcommandprompt diffcommandprompt optimizecommand16. Testing
17. Documentation
Technical Specifications
Prompt Schema
Prompt Template Example
Prompt Versioning Flow
Acceptance Criteria
Labels
phase-2,mcp,backend,prompts,qualityMilestone
Phase 2: MCP Integration