conductor(tracks): Add two deferred future tracks
- aggregation_smarter_summaries: Sub-agent summarization, hash-based caching - system_context_exposure: Expose hidden _SYSTEM_PROMPT for user customization
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "system_context_exposure",
|
||||
"created": "2026-03-22",
|
||||
"status": "future",
|
||||
"priority": "medium",
|
||||
"affected_files": [
|
||||
"src/ai_client.py",
|
||||
"src/gui_2.py",
|
||||
"src/models.py"
|
||||
],
|
||||
"related_tracks": [
|
||||
"discussion_hub_panel_reorganization (in_progress)",
|
||||
"aggregation_smarter_summaries (future)"
|
||||
],
|
||||
"notes": "Deferred from discussion_hub_panel_reorganization planning. The _SYSTEM_PROMPT in ai_client.py is hidden from users - this exposes it for customization."
|
||||
}
|
||||
41
conductor/tracks/system_context_exposure_20260322/plan.md
Normal file
41
conductor/tracks/system_context_exposure_20260322/plan.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# Implementation Plan: System Context Exposure
|
||||
|
||||
## Phase 1: Backend Changes
|
||||
Focus: Make _SYSTEM_PROMPT configurable
|
||||
|
||||
- [ ] Task: Audit ai_client.py system prompt flow
|
||||
- [ ] Task: Move _SYSTEM_PROMPT to configurable storage
|
||||
- [ ] Task: Implement load/save of base system prompt
|
||||
- [ ] Task: Modify _get_combined_system_prompt() to use config
|
||||
- [ ] Task: Write tests for configurable system prompt
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 1: Backend Changes'
|
||||
|
||||
## Phase 2: UI Implementation
|
||||
Focus: Add base prompt editor to AI Settings
|
||||
|
||||
- [ ] Task: Add UI controls to _render_system_prompts_panel
|
||||
- [ ] Task: Implement checkbox for "Use Default Base"
|
||||
- [ ] Task: Implement collapsible base prompt editor
|
||||
- [ ] Task: Add "Reset to Default" button
|
||||
- [ ] Task: Write tests for UI controls
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 2: UI Implementation'
|
||||
|
||||
## Phase 3: Persistence & Provider Testing
|
||||
Focus: Ensure persistence and cross-provider compatibility
|
||||
|
||||
- [ ] Task: Verify base prompt persists across app restarts
|
||||
- [ ] Task: Test with Gemini provider
|
||||
- [ ] Task: Test with Anthropic provider
|
||||
- [ ] Task: Test with DeepSeek provider
|
||||
- [ ] Task: Test with Gemini CLI adapter
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 3: Persistence & Provider Testing'
|
||||
|
||||
## Phase 4: Safety & Defaults
|
||||
Focus: Ensure users can recover from bad edits
|
||||
|
||||
- [ ] Task: Implement confirmation dialog before saving custom base
|
||||
- [ ] Task: Add validation for empty/invalid prompts
|
||||
- [ ] Task: Document the base prompt purpose in UI
|
||||
- [ ] Task: Add "Show Diff" between default and custom
|
||||
- [ ] Task: Write tests for safety features
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 4: Safety & Defaults'
|
||||
120
conductor/tracks/system_context_exposure_20260322/spec.md
Normal file
120
conductor/tracks/system_context_exposure_20260322/spec.md
Normal file
@@ -0,0 +1,120 @@
|
||||
# Specification: System Context Exposure
|
||||
|
||||
## 1. Overview
|
||||
|
||||
This track exposes the hidden system prompt from `ai_client.py` to users for customization.
|
||||
|
||||
**Current Problem:**
|
||||
- `_SYSTEM_PROMPT` in `ai_client.py` (lines ~118-143) is hardcoded
|
||||
- It contains foundational instructions: "You are a helpful coding assistant with access to a PowerShell tool..."
|
||||
- Users can only see/appending their custom portion via `_custom_system_prompt`
|
||||
- The base prompt that defines core agent capabilities is invisible
|
||||
|
||||
**Goal:**
|
||||
- Make `_SYSTEM_PROMPT` visible and editable in the UI
|
||||
- Allow users to customize the foundational agent instructions
|
||||
- Maintain sensible defaults while enabling expert customization
|
||||
|
||||
## 2. Current State Audit
|
||||
|
||||
### Hidden System Prompt Location
|
||||
`src/ai_client.py`:
|
||||
```python
|
||||
_SYSTEM_PROMPT: str = (
|
||||
"You are a helpful coding assistant with access to a PowerShell tool (run_powershell) and MCP tools (file access: read_file, list_directory, search_files, get_file_summary, web access: web_search, fetch_url). "
|
||||
"When calling file/directory tools, always use the 'path' parameter for the target path. "
|
||||
...
|
||||
)
|
||||
```
|
||||
|
||||
### Related State
|
||||
- `_custom_system_prompt` - user-defined append/injection
|
||||
- `_get_combined_system_prompt()` - merges both
|
||||
- `set_custom_system_prompt()` - setter for user portion
|
||||
|
||||
### UI Current State
|
||||
- AI Settings → System Prompts shows global and project prompts
|
||||
- These are injected as `[USER SYSTEM PROMPT]` after `_SYSTEM_PROMPT`
|
||||
- But `_SYSTEM_PROMPT` itself is never shown
|
||||
|
||||
## 3. Functional Requirements
|
||||
|
||||
### 3.1 Base System Prompt Visibility
|
||||
- Add "Base System Prompt" section in AI Settings
|
||||
- Display current `_SYSTEM_PROMPT` content
|
||||
- Allow editing with syntax highlighting (it's markdown text)
|
||||
|
||||
### 3.2 Default vs Custom Base
|
||||
- Maintain default base prompt as reference
|
||||
- User can reset to default if they mess it up
|
||||
- Show diff between default and custom
|
||||
|
||||
### 3.3 Persistence
|
||||
- Custom base prompt stored in config or project TOML
|
||||
- Loaded on app start
|
||||
- Applied before `_custom_system_prompt` in `_get_combined_system_prompt()`
|
||||
|
||||
### 3.4 Provider Considerations
|
||||
- Some providers handle system prompts differently
|
||||
- Verify behavior across Gemini, Anthropic, DeepSeek
|
||||
- May need provider-specific base prompts
|
||||
|
||||
## 4. Data Model
|
||||
|
||||
### 4.1 Config Storage
|
||||
```toml
|
||||
[ai_settings]
|
||||
base_system_prompt = """..."""
|
||||
use_default_base = true
|
||||
```
|
||||
|
||||
### 4.2 Combined Prompt Order
|
||||
1. `_SYSTEM_PROMPT` (or custom base if enabled)
|
||||
2. `[USER SYSTEM PROMPT]` (from AI Settings global/project)
|
||||
3. Tooling strategy (from bias engine)
|
||||
|
||||
## 5. UI Design
|
||||
|
||||
**Location:** AI Settings panel → System Prompts section
|
||||
|
||||
```
|
||||
┌─ System Prompts ──────────────────────────────┐
|
||||
│ ☑ Use Default Base System Prompt │
|
||||
│ │
|
||||
│ Base System Prompt (collapsed by default): │
|
||||
│ ┌──────────────────────────────────────────┐ │
|
||||
│ │ You are a helpful coding assistant... │ │
|
||||
│ └──────────────────────────────────────────┘ │
|
||||
│ │
|
||||
│ [Show Editor] [Reset to Default] │
|
||||
│ │
|
||||
│ Global System Prompt: │
|
||||
│ ┌──────────────────────────────────────────┐ │
|
||||
│ │ [current global prompt content] │ │
|
||||
│ └──────────────────────────────────────────┘ │
|
||||
└──────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
When "Show Editor" clicked:
|
||||
- Expand to full editor for base prompt
|
||||
- Syntax highlighting for markdown
|
||||
- Character count
|
||||
|
||||
## 6. Acceptance Criteria
|
||||
|
||||
- [ ] `_SYSTEM_PROMPT` visible in AI Settings
|
||||
- [ ] User can edit base system prompt
|
||||
- [ ] Changes persist across app restarts
|
||||
- [ ] "Reset to Default" restores original
|
||||
- [ ] Provider APIs receive modified prompt correctly
|
||||
- [ ] No regression in agent behavior with defaults
|
||||
|
||||
## 7. Out of Scope
|
||||
- Changes to actual agent behavior logic
|
||||
- Changes to tool definitions or availability
|
||||
- Changes to aggregation or context handling
|
||||
|
||||
## 8. Dependencies
|
||||
- `ai_client.py` - `_SYSTEM_PROMPT` and `_get_combined_system_prompt()`
|
||||
- `gui_2.py` - AI Settings panel rendering
|
||||
- `models.py` - Config structures
|
||||
Reference in New Issue
Block a user