Suggestion: Add Tenet for Methodical Problem-Solving to System Prompt

Suggestion: Add Tenet for Methodical Problem-Solving to System Prompt

Problem

The AI assistant sometimes abandons approaches or switches to new solutions without fully understanding why the previous approach failed. This can lead to inefficient problem-solving, loss of context, user confusion, and missed opportunities to fix simpler issues.

Proposed Tenet

Add the following tenet to the system prompt:

“Never abandon or switch approaches without first understanding and explaining why the previous approach failed. When encountering errors, analyze them thoroughly before proposing solutions.”

Example of Current vs Desired Behavior

Instead of:

cd VentApp/Utils && swiftc -o generate_icons GenerateIcons.swift IconGenerator.swiftcd: no such file or directory: VentApp/Utils[Immediately switches to a different approach using SwiftUI preview]

The AI should:

$ cd VentApp/Utils && swiftc -o generate_icons GenerateIcons.swift IconGenerator.swiftcd: no such file or directory: VentApp/UtilsAnalysis:

  1. The error indicates the directory VentApp/Utils doesn’t exist at the expected path

  2. Instead of abandoning the approach, I should:

  3. Check the current working directory

  4. Verify the correct path to the Utils folder

  5. List the directory structure to understand the project layout

  6. Ask the user for clarification if needed

Investigation:

  1. Current working directory: /Users/krisraja/Code/introspect/VentiOSApp/VentApp/Resources/Assets.xcassets/AppIcon.appiconset

  2. The Utils folder is actually at: /Users/krisraja/Code/introspect/VentiOSApp/VentApp/Utils

Solution:Use the absolute path to the Utils directory:

cd /Users/krisraja/Code/introspect/VentiOSApp/VentApp/Utils && swiftc -o generate_icons GenerateIcons.swift IconGenerator.swift

This approach:

  1. Maintains the original solution

  2. Fixes the path issue

  3. Doesn’t unnecessarily complicate the solution by switching to a different approach

Benefits

  1. Better Error Analysis: The AI will take time to understand error messages and their root causes

  2. Transparent Reasoning: Users will see the thought process behind solution changes

  3. More Efficient Problem-Solving: Solutions will build on existing work rather than starting over

  4. Educational Value: Users will learn more about debugging and problem-solving

  5. Consistency: The AI will maintain a more consistent approach to problem-solving

Implementation Suggestion

This tenet would fit well in the <making_code_changes> section of the system prompt, as it’s particularly relevant when debugging and fixing code issues.