Files
manual_slop/conductor/tracks/tool_bias_tuning_20260308/plan.md

3.2 KiB

Implementation Plan: Agent Tool Preference & Bias Tuning

Phase 1: Data Model & Storage Extension [checkpoint: 77a0b38]

  • Task: Extend the ToolPreset and Tool models. 77a0b38
    • Update src/tool_presets.py to include weight (int, 1-5) for tools. 77a0b38
    • Add parameter_bias (dict mapping parameter names to priority strings) to the Tool model. 77a0b38
    • Update ToolPresetManager to handle saving and loading these new fields from tool_presets.toml. 77a0b38
  • Task: Implement Global Bias Profiles. 77a0b38
    • Define BiasProfile dataclass in src/models.py. 77a0b38
    • Implement logic to store and retrieve these profiles from tool_presets.toml. 77a0b38
  • Task: Write unit tests for the extended data model and storage logic. 77a0b38
  • Task: Conductor - User Manual Verification 'Phase 1: Data Model Extension' (Protocol in workflow.md) 77a0b38

Phase 2: Orchestration & Nudging Logic [checkpoint: cad04bf]

  • Task: Implement the ToolBiasEngine in src/ai_client.py (or a new module). cad04bf
    • Implement apply_semantic_nudges(tool_definitions, preset): This function should modify tool descriptions with priority tags. cad04bf
    • Implement generate_tooling_strategy(preset, global_bias): This function should return a Markdown string for the system prompt. cad04bf
  • Task: Integrate the bias engine into the AI client send() loop. cad04bf
    • Ensure that for every agent turn, the tool definitions and system instructions are dynamically biased based on the active agent's role and selected preset. cad04bf
  • Task: Write integration tests for the bias generation logic. cad04bf
    • Verify that high-weight tools correctly receive "[HIGH PRIORITY]" tags. cad04bf
    • Verify that the strategy section is correctly appended to the system instructions. cad04bf
  • Task: Conductor - User Manual Verification 'Phase 2: Orchestration Logic' (Protocol in workflow.md) cad04bf

Phase 3: GUI Integration [checkpoint: 1c83b3e]

  • Task: Update the Tool Preset Manager UI. 1c83b3e
    • Add imgui.slider_int for each tool to adjust its weight. 1c83b3e
    • Add a sub-menu or modal for editing parameter-level bias. 1c83b3e
  • Task: Enhance tool list visualization. 1c83b3e
    • Implement color-coded priority badges in the Operations panel and tool settings. 1c83b3e
  • Task: Implement the "Bias Override" in the agent focus modal. 1c83b3e
    • Add a dropdown to select a global bias profile or a specific preset override before spawning a worker. 1c83b3e
  • Task: Write integration tests for the new UI data flow. 1c83b3e
  • Task: Conductor - User Manual Verification 'Phase 3: GUI Integration' (Protocol in workflow.md) 1c83b3e

Phase 4: Verification & Final Polish [checkpoint: 85ae409]

  • Task: Create a Bias Efficacy Simulation. 85ae409
    • Implement a specialized simulation test where two tools could solve a problem, and verify the agent chooses the one with higher weight. 85ae409
  • Task: Final UI polish (spacing, icons, tooltips explaining the bias system). 85ae409
  • Task: Run full suite of relevant tests. 85ae409
  • Task: Conductor - User Manual Verification 'Phase 4: Verification & Polish' (Protocol in workflow.md) 85ae409