diff --git a/.changeset/add-prompt-editor-settings.md b/.changeset/add-prompt-editor-settings.md new file mode 100644 index 000000000..e9e5644f1 --- /dev/null +++ b/.changeset/add-prompt-editor-settings.md @@ -0,0 +1,5 @@ +--- +"@gsxdsm/fusion": patch +--- + +Add Prompts section to Settings modal for fine-grained prompt customization. Users can now discover and edit AI agent prompt segments through a visual editor in the dashboard. The Prompts section (Settings → Prompts) displays all available prompt keys with their descriptions, provides textareas for editing overrides, and includes Reset buttons to restore built-in defaults. Cleared overrides are persisted as `null` to delete the override and fall back to defaults. diff --git a/README.md b/README.md index 85282597e..bbead1e2c 100644 --- a/README.md +++ b/README.md @@ -392,6 +392,18 @@ Built-in prompt templates are available for common roles: Assign templates per role with the `agentPrompts` project setting, and add custom templates for team-specific behavior. You can also set per-agent custom instructions in the dashboard. +### Fine-Grained Prompt Overrides + +The **Prompts** section in the Settings modal (dashboard) allows you to customize specific segments of AI agent prompts without replacing entire role templates. This enables surgical customization of prompt sections like: + +- Executor welcome, guardrails, spawning instructions, completion criteria +- Triage welcome and context +- Reviewer verdict criteria +- Merger conflict resolution instructions +- Agent generation and workflow step prompts + +Each prompt shows its built-in description, allows text editing, and provides a Reset button to restore the default. Overrides are stored in the project settings and fall back to built-in defaults when cleared. + ### Agent Controls (CLI) ```bash @@ -661,6 +673,7 @@ Project settings override global settings. Configure in the dashboard under **Se | `recycleWorktrees` | Project | false | Pool and reuse worktrees for efficiency | | `groupOverlappingFiles` | Project | false | Serialize tasks with shared file scopes | | `agentPrompts` | Project | - | Role-based prompt templates and assignments | +| `promptOverrides` | Project | - | Fine-grained prompt segment overrides | | `autoSummarizeTitles` | Project | false | Auto-generate titles for untitled tasks | | `autoBackupEnabled` | Project | false | Enable automatic database backups | | `autoBackupSchedule` | Project | `0 2 * * *` | Cron expression for backup schedule | diff --git a/docs/agents.md b/docs/agents.md index 2d50fa505..64c9ad23d 100644 --- a/docs/agents.md +++ b/docs/agents.md @@ -162,6 +162,42 @@ This separation means: When no assignment is configured, Fusion falls back to built-in defaults. +## Fine-Grained Prompt Overrides (`promptOverrides`) + +The **Prompts** section in the Settings modal provides a user-friendly interface for customizing specific segments of agent prompts. Unlike `agentPrompts` which replaces entire role templates, `promptOverrides` allows surgical customization of individual prompt sections. + +### Supported Override Keys + +| Key | Agent Role | Description | +|-----|-----------|-------------| +| `executor-welcome` | executor | Introductory section for the executor agent | +| `executor-guardrails` | executor | Behavioral guardrails and constraints | +| `executor-spawning` | executor | Instructions for spawning child agents | +| `executor-completion` | executor | Completion criteria and signaling | +| `triage-welcome` | triage | Introductory section for the triage/specification agent | +| `triage-context` | triage | Context-gathering instructions | +| `reviewer-verdict` | reviewer | Verdict criteria and format | +| `merger-conflicts` | merger | Merge conflict resolution instructions | +| `agent-generation-system` | — | System prompt for AI-assisted agent specification generation | +| `workflow-step-refine` | — | System prompt for refining workflow step descriptions | + +### How It Works + +1. Navigate to **Settings → Prompts** in the dashboard +2. Each prompt shows its name, key, description, and current value +3. Edit the textarea to create a custom override +4. Click **Reset** to restore the built-in default + +### Clearing Overrides + +To clear a specific override, click the **Reset** button in the UI. This sends `null` for that prompt key, deleting the override from settings and reverting to the built-in default. + +### Relationship with `agentPrompts` + +- `agentPrompts` replaces entire role templates +- `promptOverrides` customizes individual segments within any template +- Both can be used together — `promptOverrides` applies to the segment even within a custom role template + ## Inter-Agent Messaging Messaging is available in dashboard mailbox UI and CLI.