chore(conductor): Add new track 'Saved System Prompt Presets'

This commit is contained in:
2026-03-08 12:35:03 -04:00
parent 790904a094
commit 28cc901c0a
7 changed files with 156 additions and 48 deletions

View File

@@ -125,6 +125,10 @@ This file tracks all major tracks for the project. Each track has its own detail
*Link: [./tracks/gui_path_config_20260308/](./tracks/gui_path_config_20260308/)* *Link: [./tracks/gui_path_config_20260308/](./tracks/gui_path_config_20260308/)*
*Goal: Add path configuration UI to Context Hub. Allow users to view and edit configurable paths directly from the GUI.* *Goal: Add path configuration UI to Context Hub. Allow users to view and edit configurable paths directly from the GUI.*
29. [ ] **Track: Saved System Prompt Presets**
*Link: [./tracks/saved_presets_20260308/](./tracks/saved_presets_20260308/)*
*Goal: Ability to have saved presets for global and project system prompts. Includes full AI profiles with temperature and top_p settings, managed via a dedicated GUI modal.*
--- ---
## Completed / Archived ## Completed / Archived

View File

@@ -0,0 +1,5 @@
# Track saved_presets_20260308 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)

View File

@@ -0,0 +1,8 @@
{
"track_id": "saved_presets_20260308",
"type": "feature",
"status": "new",
"created_at": "2026-03-08T12:35:00Z",
"updated_at": "2026-03-08T12:35:00Z",
"description": "Ability to have saved presets for global and project system prompts."
}

View File

@@ -0,0 +1,46 @@
# Implementation Plan: Saved System Prompt Presets
## Phase 1: Foundation & Data Model
- [ ] Task: Define the `Preset` data model and storage logic.
- [ ] Create `src/models.py` (if not existing) or update it with a `Preset` dataclass/Pydantic model.
- [ ] Implement `PresetManager` in a new file `src/presets.py` to handle loading/saving to `presets.toml` and `project_presets.toml`.
- [ ] Implement the inheritance logic where project presets override global ones.
- [ ] Task: Write unit tests for `PresetManager`.
- [ ] Test loading global presets.
- [ ] Test loading project presets.
- [ ] Test the override logic (same name).
- [ ] Test saving/updating presets.
- [ ] Task: Conductor - User Manual Verification 'Phase 1: Foundation & Data Model' (Protocol in workflow.md)
## Phase 2: UI: Settings Integration
- [ ] Task: Add Preset Dropdown to Global AI Settings.
- [ ] Modify `gui_2.py` to include a dropdown in the "AI Settings" panel.
- [ ] Populated the dropdown with available global presets.
- [ ] Task: Add Preset Dropdown to Project Settings.
- [ ] Modify `gui_2.py` to include a dropdown in the "Project Settings" panel.
- [ ] Populated the dropdown with available project-specific presets (including overridden globals).
- [ ] Task: Implement "Auto-Load" logic.
- [ ] When a preset is selected, update the active system prompt and model settings in `gui_2.py`.
- [ ] Task: Write integration tests for settings integration using `live_gui`.
- [ ] Verify global dropdown shows global presets.
- [ ] Verify project dropdown shows project + global presets.
- [ ] Verify selecting a preset updates the UI fields (prompt, temperature).
- [ ] Task: Conductor - User Manual Verification 'Phase 2: UI: Settings Integration' (Protocol in workflow.md)
## Phase 3: UI: Preset Manager Modal
- [ ] Task: Create the `PresetManagerModal` in `gui_2.py` (or a separate module).
- [ ] Implement a list view of all presets (global and project).
- [ ] Implement "Add", "Edit", and "Delete" functionality.
- [ ] Ensure validation for unique names.
- [ ] Task: Add a button to open the manager modal from the settings panels.
- [ ] Task: Write integration tests for the Preset Manager using `live_gui`.
- [ ] Verify creating a new preset adds it to the list and dropdown.
- [ ] Verify editing an existing preset updates it correctly.
- [ ] Verify deleting a preset removes it from the list and dropdown.
- [ ] Task: Conductor - User Manual Verification 'Phase 3: UI: Preset Manager Modal' (Protocol in workflow.md)
## Phase 4: Final Integration & Polish
- [ ] Task: Ensure robust error handling for missing or malformed `.toml` files.
- [ ] Task: Final UI polish (spacing, icons, tooltips).
- [ ] Task: Run full suite of relevant tests.
- [ ] Task: Conductor - User Manual Verification 'Phase 4: Final Integration & Polish' (Protocol in workflow.md)

View File

@@ -0,0 +1,39 @@
# Specification: Saved System Prompt Presets
## Overview
This feature introduces the ability to save, manage, and switch between system prompt presets for both global (application-wide) and project-specific contexts. Presets will include not only the system prompt text but also model-specific parameters like temperature and top_p, effectively allowing for "AI Profiles."
## Functional Requirements
- **Dedicated Storage:**
- Global presets: Stored in a global `presets.toml` file (located in the application configuration directory).
- Project presets: Stored in a `project_presets.toml` file within the project's root directory.
- **Preset Content:**
- `name`: A unique identifier for the preset.
- `system_prompt`: The text of the system prompt.
- `temperature`: (Optional) Model temperature setting.
- `top_p`: (Optional) Model top_p setting.
- `max_output_tokens`: (Optional) Maximum output tokens.
- **Inheritance & Overriding:**
- The UI will display a unified list of global and project-specific presets.
- If a project-specific preset has the same name as a global one, the project-specific version will override it.
- **GUI Interactions:**
- **Settings Dropdown:** A dropdown menu in the "AI Settings" (global) and "Project Settings" (per-project) panels for quick switching between presets.
- **Preset Manager Modal:** A dedicated modal accessible from the settings panels to create, edit, and delete presets.
- **Auto-Loading:** Switching a preset in the dropdown will immediately update the active system prompt and associated model parameters in the AI client configuration.
## Non-Functional Requirements
- **Persistence:** All changes made in the Preset Manager must be immediately persisted to the corresponding `.toml` file.
- **Validation:** Ensure preset names are unique within their scope (global or project).
- **Concurrency:** Ensure safe file access if multiple windows or instances are open (though Manual Slop is primarily single-instance).
## Acceptance Criteria
- [ ] Users can create a new global preset and see it in the dropdown across all projects.
- [ ] Users can create a project-specific preset that is only visible when that project is active.
- [ ] Overriding a global preset with a project-specific one (same name) correctly loads the project version.
- [ ] Changing a preset via the dropdown updates the active AI configuration (prompt, temperature, etc.).
- [ ] The Preset Manager modal allows for full CRUD (Create, Read, Update, Delete) operations on presets.
## Out of Scope
- Support for other file formats (e.g., JSON, YAML) for presets.
- Presets for specific files or folders (scoped only to global or project level).
- Cloud syncing of presets.

View File

@@ -1,9 +1,9 @@
[ai] [ai]
provider = "gemini_cli" provider = "minimax"
model = "gemini-2.5-flash-lite" model = "MiniMax-M2.5"
temperature = 0.0 temperature = 0.0
max_tokens = 8192 max_tokens = 24000
history_trunc_limit = 8000 history_trunc_limit = 900000
system_prompt = "" system_prompt = ""
[projects] [projects]

View File

@@ -12,7 +12,7 @@ ViewportPos=43,95
ViewportId=0x78C57832 ViewportId=0x78C57832
Size=897,649 Size=897,649
Collapsed=0 Collapsed=0
DockId=0x00000006,0 DockId=0x00000001,0
[Window][Files] [Window][Files]
ViewportPos=3125,170 ViewportPos=3125,170
@@ -33,7 +33,7 @@ DockId=0x0000000A,0
Pos=0,17 Pos=0,17
Size=1680,730 Size=1680,730
Collapsed=0 Collapsed=0
DockId=0x00000006,0 DockId=0x00000001,0
[Window][Provider] [Window][Provider]
ViewportPos=43,95 ViewportPos=43,95
@@ -41,17 +41,18 @@ ViewportId=0x78C57832
Pos=0,651 Pos=0,651
Size=897,468 Size=897,468
Collapsed=0 Collapsed=0
DockId=0x00000006,0 DockId=0x00000001,0
[Window][Message] [Window][Message]
Pos=1020,1643 Pos=1005,726
Size=954,371 Size=1065,548
Collapsed=0 Collapsed=0
[Window][Response] [Window][Response]
Pos=92,1433 Pos=826,1416
Size=842,625 Size=873,721
Collapsed=0 Collapsed=0
DockId=0x00000014,1
[Window][Tool Calls] [Window][Tool Calls]
Pos=99,730 Pos=99,730
@@ -74,7 +75,7 @@ DockId=0xAFC85805,2
[Window][Theme] [Window][Theme]
Pos=0,17 Pos=0,17
Size=32,980 Size=824,961
Collapsed=0 Collapsed=0
DockId=0x00000005,1 DockId=0x00000005,1
@@ -84,14 +85,14 @@ Size=900,700
Collapsed=0 Collapsed=0
[Window][Diagnostics] [Window][Diagnostics]
Pos=653,17 Pos=2813,17
Size=1027,1183 Size=1027,2120
Collapsed=0 Collapsed=0
DockId=0x00000004,2 DockId=0x00000004,2
[Window][Context Hub] [Window][Context Hub]
Pos=0,17 Pos=0,17
Size=32,980 Size=824,961
Collapsed=0 Collapsed=0
DockId=0x00000005,0 DockId=0x00000005,0
@@ -102,28 +103,28 @@ Collapsed=0
DockId=0x0000000D,0 DockId=0x0000000D,0
[Window][Discussion Hub] [Window][Discussion Hub]
Pos=325,17 Pos=1761,17
Size=326,779 Size=1050,1397
Collapsed=0 Collapsed=0
DockId=0x00000013,0 DockId=0x00000013,0
[Window][Operations Hub] [Window][Operations Hub]
Pos=34,17 Pos=826,17
Size=289,779 Size=933,1397
Collapsed=0 Collapsed=0
DockId=0x00000012,0 DockId=0x00000012,0
[Window][Files & Media] [Window][Files & Media]
Pos=0,999 Pos=0,1560
Size=32,201 Size=824,577
Collapsed=0 Collapsed=0
DockId=0x00000006,1 DockId=0x00000002,0
[Window][AI Settings] [Window][AI Settings]
Pos=0,999 Pos=0,980
Size=32,201 Size=824,578
Collapsed=0 Collapsed=0
DockId=0x00000006,0 DockId=0x00000001,0
[Window][Approve Tool Execution] [Window][Approve Tool Execution]
Pos=3,524 Pos=3,524
@@ -131,14 +132,14 @@ Size=416,325
Collapsed=0 Collapsed=0
[Window][MMA Dashboard] [Window][MMA Dashboard]
Pos=653,17 Pos=2813,17
Size=1027,1183 Size=1027,2120
Collapsed=0 Collapsed=0
DockId=0x00000004,0 DockId=0x00000004,0
[Window][Log Management] [Window][Log Management]
Pos=653,17 Pos=2813,17
Size=1027,1183 Size=1027,2120
Collapsed=0 Collapsed=0
DockId=0x00000004,1 DockId=0x00000004,1
@@ -148,37 +149,37 @@ Size=262,209
Collapsed=0 Collapsed=0
[Window][Tier 1: Strategy] [Window][Tier 1: Strategy]
Pos=34,798 Pos=826,1416
Size=288,402 Size=873,721
Collapsed=0 Collapsed=0
DockId=0x00000014,0 DockId=0x00000014,0
[Window][Tier 2: Tech Lead] [Window][Tier 2: Tech Lead]
Pos=324,798 Pos=1701,1416
Size=92,402 Size=353,721
Collapsed=0 Collapsed=0
DockId=0x00000016,0 DockId=0x00000016,0
[Window][Tier 4: QA] [Window][Tier 4: QA]
Pos=568,798 Pos=2542,1416
Size=83,402 Size=269,721
Collapsed=0 Collapsed=0
DockId=0x00000019,0 DockId=0x00000019,0
[Window][Tier 3: Workers] [Window][Tier 3: Workers]
Pos=418,798 Pos=2056,1416
Size=148,402 Size=484,721
Collapsed=0 Collapsed=0
DockId=0x00000018,0 DockId=0x00000018,0
[Window][Approve PowerShell Command] [Window][Approve PowerShell Command]
Pos=649,435 Pos=649,435
Size=616,429 Size=381,329
Collapsed=0 Collapsed=0
[Window][Last Script Output] [Window][Last Script Output]
Pos=60,60 Pos=1005,343
Size=800,600 Size=800,562
Collapsed=0 Collapsed=0
[Window][Text Viewer - Log Entry #1 (request)] [Window][Text Viewer - Log Entry #1 (request)]
@@ -212,7 +213,7 @@ Size=3840,32
Collapsed=0 Collapsed=0
[Window][Text Viewer - message] [Window][Text Viewer - message]
Pos=566,1226 Pos=568,1226
Size=900,700 Size=900,700
Collapsed=0 Collapsed=0
@@ -366,29 +367,34 @@ Column 1 Weight=1.0000
Column 2 Width=150 Column 2 Width=150
Column 3 Width=40 Column 3 Width=40
[Table][0xD99F45C5,4]
Column 0 Sort=0v
[Docking][Data] [Docking][Data]
DockNode ID=0x00000008 Pos=3125,170 Size=593,1157 Split=Y DockNode ID=0x00000008 Pos=3125,170 Size=593,1157 Split=Y
DockNode ID=0x00000009 Parent=0x00000008 SizeRef=1029,147 Selected=0x0469CA7A DockNode ID=0x00000009 Parent=0x00000008 SizeRef=1029,147 Selected=0x0469CA7A
DockNode ID=0x0000000A Parent=0x00000008 SizeRef=1029,145 Selected=0xDF822E02 DockNode ID=0x0000000A Parent=0x00000008 SizeRef=1029,145 Selected=0xDF822E02
DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,17 Size=1680,1183 Split=X DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,17 Size=3840,2120 Split=X
DockNode ID=0x00000003 Parent=0xAFC85805 SizeRef=2811,1183 Split=X DockNode ID=0x00000003 Parent=0xAFC85805 SizeRef=2811,1183 Split=X
DockNode ID=0x0000000B Parent=0x00000003 SizeRef=404,1186 Split=X Selected=0xF4139CA2 DockNode ID=0x0000000B Parent=0x00000003 SizeRef=404,1186 Split=X Selected=0xF4139CA2
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=824,858 Split=Y Selected=0x8CA2375C DockNode ID=0x00000007 Parent=0x0000000B SizeRef=824,858 Split=Y Selected=0x8CA2375C
DockNode ID=0x00000005 Parent=0x00000007 SizeRef=295,980 Selected=0xF4139CA2 DockNode ID=0x00000005 Parent=0x00000007 SizeRef=295,961 Selected=0xF4139CA2
DockNode ID=0x00000006 Parent=0x00000007 SizeRef=295,1138 CentralNode=1 Selected=0x7BD57D6A DockNode ID=0x00000006 Parent=0x00000007 SizeRef=295,1157 Split=Y Selected=0x7BD57D6A
DockNode ID=0x00000001 Parent=0x00000006 SizeRef=824,578 CentralNode=1 Selected=0x7BD57D6A
DockNode ID=0x00000002 Parent=0x00000006 SizeRef=824,577 Selected=0x1DCB2623
DockNode ID=0x0000000E Parent=0x0000000B SizeRef=1985,858 Split=Y Selected=0x418C7449 DockNode ID=0x0000000E Parent=0x0000000B SizeRef=1985,858 Split=Y Selected=0x418C7449
DockNode ID=0x00000010 Parent=0x0000000E SizeRef=868,1397 Split=X Selected=0x418C7449 DockNode ID=0x00000010 Parent=0x0000000E SizeRef=868,1397 Split=X Selected=0x418C7449
DockNode ID=0x00000012 Parent=0x00000010 SizeRef=933,402 Selected=0x418C7449 DockNode ID=0x00000012 Parent=0x00000010 SizeRef=933,402 Selected=0x418C7449
DockNode ID=0x00000013 Parent=0x00000010 SizeRef=1050,402 Selected=0x6F2B5B04 DockNode ID=0x00000013 Parent=0x00000010 SizeRef=1050,402 Selected=0x6F2B5B04
DockNode ID=0x00000011 Parent=0x0000000E SizeRef=868,721 Split=X Selected=0x5CDB7A4B DockNode ID=0x00000011 Parent=0x0000000E SizeRef=868,721 Split=X Selected=0x5CDB7A4B
DockNode ID=0x00000014 Parent=0x00000011 SizeRef=930,837 Selected=0xBB346584 DockNode ID=0x00000014 Parent=0x00000011 SizeRef=873,837 Selected=0x0D5A5273
DockNode ID=0x00000015 Parent=0x00000011 SizeRef=1053,837 Split=X Selected=0x5CDB7A4B DockNode ID=0x00000015 Parent=0x00000011 SizeRef=1110,837 Split=X Selected=0x5CDB7A4B
DockNode ID=0x00000016 Parent=0x00000015 SizeRef=296,837 Selected=0x390E7942 DockNode ID=0x00000016 Parent=0x00000015 SizeRef=353,837 Selected=0x390E7942
DockNode ID=0x00000017 Parent=0x00000015 SizeRef=755,837 Split=X Selected=0x655BC6E9 DockNode ID=0x00000017 Parent=0x00000015 SizeRef=755,837 Split=X Selected=0x655BC6E9
DockNode ID=0x00000018 Parent=0x00000017 SizeRef=484,874 Selected=0x655BC6E9 DockNode ID=0x00000018 Parent=0x00000017 SizeRef=484,874 Selected=0x655BC6E9
DockNode ID=0x00000019 Parent=0x00000017 SizeRef=269,874 Selected=0x5CDB7A4B DockNode ID=0x00000019 Parent=0x00000017 SizeRef=269,874 Selected=0x5CDB7A4B
DockNode ID=0x0000000D Parent=0x00000003 SizeRef=435,1186 Selected=0x363E93D6 DockNode ID=0x0000000D Parent=0x00000003 SizeRef=435,1186 Selected=0x363E93D6
DockNode ID=0x00000004 Parent=0xAFC85805 SizeRef=1027,1183 Selected=0x3AEC3498 DockNode ID=0x00000004 Parent=0xAFC85805 SizeRef=1027,1183 Selected=0x2C0206CE
;;;<<<Layout_655921752_Default>>>;;; ;;;<<<Layout_655921752_Default>>>;;;
;;;<<<HelloImGui_Misc>>>;;; ;;;<<<HelloImGui_Misc>>>;;;