Skip to content

Feature/polya #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Feature/polya #12

wants to merge 12 commits into from

Conversation

shuane
Copy link

@shuane shuane commented Jun 19, 2025

This patch adds polya.py which implements George Polya's problem-solving framework as interactive prompt messages in SolveIt. The module provides:

  1. Four main steps of Polya's method as classes (PolyaUnderstand, PolyaPlan, PolyaAct, PolyaReview)
  2. Convenience instances of each step (understand, plan, act, review)
  3. A QQ class for question prompts that can update the current message as a prompt or note
  4. A Step base class that organizes related questions/prompts

The implementation allows users to:

  • Access structured problem-solving questions through code completion
  • Dynamically generate prompts during problem-solving sessions
  • Follow Polya's systematic approach while maintaining flexibility

Usage Examples:

Basic usage with code completion:

# Message/Cell 1
import dialoghelper.polya as dhp

# Message/Cell 2 - best as a different cell so that dhp would be available after a "Run All"/Reset
dhp.understand.  # [tab completion shows: summary, info, similar, lateral, etc.]
dhp.understand.summary()  # Updates current message with summary prompt

The implementation provides a speedy and interactive way to guide problem-solving sessions while maintaining all the benefits of SolveIt's message system.

This PR was inspired by contextpack, which adds code completion for various projects' llms.txt or llms-ctx.txt URLs.

Duane Milne added 12 commits June 18, 2025 07:44
@shuane
Copy link
Author

shuane commented Jun 20, 2025

Will re-submit with some fixes...

@shuane shuane closed this Jun 20, 2025
@shuane shuane reopened this Jun 20, 2025
@shuane
Copy link
Author

shuane commented Jun 20, 2025

Improved repr handling and reverted core to using fetchone (not selectone)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant