summaryrefslogtreecommitdiff
path: root/internal/promptstore/store_test.go
AgeCommit message (Collapse)Author
2026-03-16Replace Summary: prefixes with standard Go package doc commentsPaul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12feat: add design_prompt meta-prompt for implementation planningPaul Buetow
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11feat: add delete_prompt built-in meta-promptPaul Buetow
Adds a third built-in meta-prompt for interactively deleting custom prompts with confirmation. This completes the prompt management trilogy (save, update, delete). Changes: - Add delete_prompt meta-prompt with prompt_name argument - Interactive workflow: show prompt → confirm → delete via delete_prompt tool - Update test to expect 3 built-in prompts (was 2) - Includes safety notes about built-in prompts and backups The meta-prompt ensures users see what they're deleting and must explicitly confirm before the delete_prompt tool is called. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11refactor: compile built-in prompts into binary instead of external filesPaul Buetow
This change moves built-in meta-prompts (save_prompt, update_prompt) from external JSONL files into compiled Go code, making them always available and version-controlled with the binary. Changes: - Add default_prompts.go with built-in meta-prompt definitions - Update store to load built-ins from code, not files - Add protection: built-ins cannot be updated/deleted - Handle name conflicts: built-ins take precedence with warnings - Update docs to reflect new architecture (no default.jsonl needed) - Add comprehensive tests for built-in protection - Add hexai-mcp-server binary to .gitignore Benefits: - Built-ins always in sync with binary version - No setup required (no default.jsonl to manage) - Clear separation between built-in and user prompts - Protection prevents accidental modification of meta-prompts Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10Refactor MCP server to meet project standards and remove built-in promptsPaul Buetow
Ensures all code complies with AGENTS.md standards: - Refactored functions to be under 50 lines each - Removed built-in prompts - all prompts now served from database only - Split handlePromptsCreate (72→37 lines) with helper functions - Split handlePromptsUpdate (76→44 lines) with helper function - Deleted internal/promptstore/builtin.go (no longer needed) - Updated tests to create prompts dynamically instead of relying on built-ins All tests pass with 81.5% coverage maintained. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10Add MCP server implementation with comprehensive test coveragePaul Buetow
Implements a full Model Context Protocol (MCP) server for managing and serving prompts to LLM applications. The server provides CRUD operations for prompts with automatic backups and template rendering support. Key additions: - cmd/hexai-mcp-server: Main MCP server binary entrypoint - internal/hexaimcp: Server orchestrator with configuration and setup - internal/mcp: Core MCP protocol implementation (JSON-RPC 2.0) - internal/promptstore: Prompt storage with JSONL backend and automatic backups - Comprehensive test suites achieving 80%+ coverage for all MCP packages - Magefile targets for building and installing the MCP server - Complete documentation for setup, API, prompts, and backups Test coverage: - internal/hexaimcp: 84.3% - internal/mcp: 80.3% - internal/promptstore: 81.2% - Overall project: 81.5% Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>