Cover image for project: NEXUS Prompts IN PROGRESS

Technical summary

NEXUS prompt editor and manager for AI personalities that centralizes directives with versioning, usage and efficiency metrics. Dynamic templates with {{var}} variables, a gallery of ready-to-clone algorithms and module/AI-target filters standardize instruction automation.

Executed scope

  • Registration: plugin.json v1.0.0, lucide message-square icon, icon_bg #eff6ff and custom icon.svg (chat bubble, no is_core — additional plugin); registerTab('prompts','Prompts','message-square',tab.php) and registerDoc('prompts','Gerenciamento de Prompts','message-square',doc.md); 7 modals registered (prompt, prompt-preview, prompt-modules, prompt-engines, prompt-statuses, prompt-run, prompt-gallery) and custom JS via registerJs('prompts','/plugins/prompts/assets/prompts-v2.js').
  • Tables via install.sql: prompts (id INT PK AI, title VARCHAR(255) NOT NULL, content TEXT NOT NULL, module VARCHAR(100) DEFAULT 'Geral', target_ia VARCHAR(100), status VARCHAR(50), updated_at DATETIME ON UPDATE, usage_count INT DEFAULT 0, efficiency INT DEFAULT 100, is_favorite TINYINT(1) DEFAULT 0) and prompt_versions (id INT PK AI, prompt_id INT NOT NULL FK → prompts.id ON DELETE CASCADE, content TEXT snapshot, created_at DATETIME) — InnoDB utf8mb4.
  • Automatic versioning: prompt_save snapshots the previous content into prompt_versions whenever the content changes; prompt_versions_get returns up to 10 latest revisions; restoreVersion restores with confirmation (the current content becomes a new history revision).
  • API with 15 actions: prompt_list (ordered by favorite DESC, usage DESC, module, title), prompt_save, prompt_delete, prompt_usage_increment, prompt_favorite_toggle (toggles 1 − is_favorite), prompt_versions_get, legacy aliases prompts_list/prompts_save/prompts_delete and persistent meta prompt_modules_*, prompt_engines_* and prompt_statuses_* (saved to system_settings via DB::setConfig).
  • Persistent settings: modules (prompt_modules), AI engines (ai_engines) and statuses (prompt_statuses with id/value/label/emoji/color) — with default fallbacks at boot (Gemini, GPT-4, Claude, Flux, Ollama; Atualizado 🟢 / Em Teste 🟡 / Obsoleto 🔴).
  • Dynamic templates: {{var}} variables detected by hasVariables/runPrompt; the Variable Injector modal builds a dynamic form and "Generate & Copy" replaces every occurrence (escaped regex) and increments the prompt usage.
  • Template gallery: 4 built-in algorithms (SEO Expert Agent GPT-4o, Clean Code Directive Claude 3.5, VSL Copywriting 5.0 GPT-4o, Brutal Bug Analyst Claude 3.5) with one-click cloning ('Galeria' module).
  • Fast Responses: /prompts (no argument) → prompt_list — lists saved prompts.
  • No cron: empty cronjob.json — fully on-demand plugin, "no safe or necessary periodic routine".
  • UI: Alpine.js tab (tab.php, 308 lines) with 6 stats (Total, Gemini, GPT-4, Claude, Images, Health), module pills with counts, search and IA/module filters, 5-per-page pagination, ultra-compact table with usage/precision metrics, colored status badges and favorite/run/copy/edit/delete actions; contextual onboarding empty state ("Comece agora!").
  • No Intelligence Hub enricher: purely a prompt management plugin, no core/intel.php integration (unlike the enrichment plugins).

Stack and tools

  • PHP 8 backend (no framework) + MySQL 8 (prompts and prompt_versions tables)
  • Alpine.js + Tailwind CSS (tab + 7 modals) + lucide icons
  • Internal Plugin API (tabs/modals/actions + fastr.json + system_settings)

Tags

Prompts, AI, Prompt Engineering, Versioning, Gallery, NEXUS Plugin

Operational result

  • Central prompt library: personality directives versioned by module and target AI — a single place for the AI "algorithms".
  • Usage and efficiency metrics: ranking by favorites and usage, with perceived precision (0–100) per prompt.
  • Zero rework: one-click revision restore, with automatic snapshot of the current content.
  • Code-free standardization: modules, AI engines and statuses configurable from the panel — persisted in system_settings.
  • Instant templates: one-click gallery cloning and {{var}} variables for safe reuse.
  • Secure: all actions require a Bearer token and the 'prompts' module permission in api.php.

GitHub progress (issues)

Real-time panel with latest repository issues.

abertas (amostra): -- fechadas (amostra): -- base: -- ultimas issues

carregando andamento...

Real results

NEXUS prompt editor and manager for AI personalities that centralizes directives with versioning, usage and efficiency metrics. Dynamic templates with {{var}} variables, a gallery of ready-to-clone algorithms and module/AI-target filters standardize instruction automation.

Architecture and organization

Execution and operations

The project follows reproducible execution flow with technical validation in production-like environments.

Screenshots

Talk about this project

Apply this implementation pattern in your environment and accelerate delivery with technical consistency.