conductor(checkpoint): Checkpoint end of Phase 1 (Directory Migration)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# Track Debrief: Saved System Prompt Presets
|
||||
|
||||
## Outcome
|
||||
Implemented foundational "System Prompt Presets" with scoped inheritance (Global/Project) and integrated model parameters (Temperature, Top-P, Max Tokens).
|
||||
|
||||
## Conceptual Dilemma
|
||||
During implementation, a conflict was identified between "Prompt Presets" and "Model Settings." Selecting a preset from a prompt dropdown currently overrides global model parameters, which is unintuitive when multiple prompts (Global, Project, MMA) contribute to a single agent turn.
|
||||
|
||||
## Future Direction: Agent Personas
|
||||
To resolve this, we will move toward a **Unified Persona** model.
|
||||
- **Consolidation:** Provider, Model, Parameters, Prompts (all scopes), and Tool Presets will be grouped into a single "Persona" object.
|
||||
- **UI Overhaul:** The "AI Settings" panel will be refactored to focus on "Active Persona" selection rather than fragmented prompt/model controls.
|
||||
- **MMA Integration:** MMA agents will eventually be assigned specific Personas, allowing for differentiated behaviors (e.g., a "Creative Worker" vs. a "Strict QA").
|
||||
|
||||
## Implementation Sequence
|
||||
1. **Track: Saved Tool Presets** (Upcoming)
|
||||
2. **Track: Agent Tool Preference & Bias Tuning** (Upcoming)
|
||||
3. **Track: Agent Personas: Unified Profiles & Tool Presets** (Final Consolidation) - *This track will consume the findings from this debrief and the components from the preceding tracks.*
|
||||
@@ -0,0 +1,5 @@
|
||||
# Track saved_presets_20260308 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -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."
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
# Implementation Plan: Saved System Prompt Presets
|
||||
|
||||
## Phase 1: Foundation & Data Model
|
||||
- [x] Task: Define the `Preset` data model and storage logic.
|
||||
- [x] Create `src/models.py` (if not existing) or update it with a `Preset` dataclass/Pydantic model.
|
||||
- [x] Implement `PresetManager` in a new file `src/presets.py` to handle loading/saving to `presets.toml` and `project_presets.toml`.
|
||||
- [x] Implement the inheritance logic where project presets override global ones.
|
||||
- [x] Task: Write unit tests for `PresetManager`.
|
||||
- [x] Test loading global presets.
|
||||
- [x] Test loading project presets.
|
||||
- [x] Test the override logic (same name).
|
||||
- [x] Test saving/updating presets.
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 1: Foundation & Data Model' (Protocol in workflow.md)
|
||||
|
||||
## Phase 2: UI: Settings Integration
|
||||
- [x] Task: Add Preset Dropdown to Global AI Settings.
|
||||
- [x] Modify `gui_2.py` to include a dropdown in the "AI Settings" panel.
|
||||
- [x] Populated the dropdown with available global presets.
|
||||
- [x] Task: Add Preset Dropdown to Project Settings.
|
||||
- [x] Modify `gui_2.py` to include a dropdown in the "Project Settings" panel.
|
||||
- [x] Populated the dropdown with available project-specific presets (including overridden globals).
|
||||
- [x] Task: Implement "Auto-Load" logic.
|
||||
- [x] When a preset is selected, update the active system prompt and model settings in `gui_2.py`.
|
||||
- [x] Task: Write integration tests for settings integration using `live_gui`.
|
||||
- [x] Verify global dropdown shows global presets.
|
||||
- [x] Verify project dropdown shows project + global presets.
|
||||
- [x] Verify selecting a preset updates the UI fields (prompt, temperature).
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 2: UI: Settings Integration' (Protocol in workflow.md)
|
||||
|
||||
## Phase 3: UI: Preset Manager Modal
|
||||
- [x] Task: Create the `PresetManagerModal` in `gui_2.py` (or a separate module).
|
||||
- [x] Implement a list view of all presets (global and project).
|
||||
- [x] Implement "Add", "Edit", and "Delete" functionality.
|
||||
- [x] Ensure validation for unique names.
|
||||
- [x] Task: Add a button to open the manager modal from the settings panels.
|
||||
- [x] Task: Write integration tests for the Preset Manager using `live_gui`.
|
||||
- [x] Verify creating a new preset adds it to the list and dropdown.
|
||||
- [x] Verify editing an existing preset updates it correctly.
|
||||
- [x] Verify deleting a preset removes it from the list and dropdown.
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 3: UI: Preset Manager Modal' (Protocol in workflow.md)
|
||||
|
||||
## Phase 4: Final Integration & Polish
|
||||
- [x] Task: Ensure robust error handling for missing or malformed `.toml` files.
|
||||
- [x] Task: Bugfix: Correct `PresetManager` initialization to use project parent directory.
|
||||
- [x] Task: Hardening: Wrap modal rendering in `try...finally` to prevent ImGui state corruption.
|
||||
- [x] Task: Hardening: Ensure `PresetManager._save_file` validates that parent is a directory.
|
||||
- [x] Task: Feature: Implement "Pop Out Task DAG" option in MMA Dashboard.
|
||||
- [x] Task: Final UI polish (spacing, icons, tooltips).
|
||||
- [x] Task: Run full suite of relevant tests.
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 4: Final Integration & Polish' (Protocol in workflow.md)
|
||||
@@ -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.
|
||||
Reference in New Issue
Block a user