From d3810ca268f8db2867ae838d0655fb7a56e67252 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 11 Feb 2026 22:14:42 +0200 Subject: refactor: compile built-in prompts into binary instead of external files 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 --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 18f6c6f..71d3b39 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ It has got improved capabilities for Go code understanding (for example, create - Automatic backups on every change (keeps last 10) - Compatible with Claude Code CLI, Cursor, and other MCP clients - File-based storage with JSONL format (git-friendly) - - Built-in prompts for code review, testing, documentation, etc. + - Built-in meta-prompts for interactive prompt creation and management * TUI AI code-action runner (`hexai-tmux-action`) with Bubble Tea - Includes a "Custom prompt" action (hotkey `p`) that opens your editor (`$HEXAI_EDITOR` or `$EDITOR`) on a temporary Markdown file. * Tmux popup editor (`hexai-tmux-edit`) for composing longer AI agent prompts @@ -56,7 +56,6 @@ hexai follows the XDG Base Directory Specification: - `hexai-tmux-edit.log` - Tmux edit debug logs - `hexai-mcp-server.log` - MCP server debug logs - **Data:** `~/.local/hexai/data/` (or `$XDG_DATA_HOME/`) - - `prompts/default.jsonl` - Built-in prompts for MCP server - - `prompts/user.jsonl` - User-created custom prompts + - `prompts/user.jsonl` - User-created custom prompts (built-in prompts are compiled into the binary) - **Temporary Files:** `/tmp/` (OS temp directory) - `hexai-*.md` - Temporary editor workspaces (auto-deleted) -- cgit v1.2.3