Skip to content

fix: scope scoring bug + add prompt_score tests - #66

Closed
TerminalGravity wants to merge 1 commit into
mainfrom
fix/prompt-score-tests-and-scope-bug
Closed

fix: scope scoring bug + add prompt_score tests#66
TerminalGravity wants to merge 1 commit into
mainfrom
fix/prompt-score-tests-and-scope-bug

Conversation

@TerminalGravity

Copy link
Copy Markdown
Collaborator

What

  • Bug fix: scorePrompt gave full scope score (25/25) to any prompt >100 chars, even vague ones like "improve the performance of the application because it's slow". Now gives partial credit (20/25) with actionable feedback.
  • Tests: 12 new tests for scorePrompt covering all four scoring dimensions, grade boundaries, and edge cases. Test count: 43 → 55.
  • Export: scorePrompt is now exported for direct testing.

Why

Zero tool-level test coverage existed. prompt_score is the most user-facing tool — scoring bugs directly mislead users about prompt quality.

- Export scorePrompt for testing
- Fix bug where prompts >100 chars got full scope (25/25) regardless of
  actual scope clarity. Now gives partial credit (20/25) with actionable
  feedback to add explicit scope keywords.
- Add 12 tests for scorePrompt covering all four dimensions, grade
  boundaries, and edge cases.

Tests: 43 → 55 (all passing)

@TerminalGravity TerminalGravity left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch on the scope scoring — giving 25/25 to any prompt >100 chars was definitely wrong. Partial credit with actionable feedback is the right call. 12 new tests covering all four dimensions is solid coverage. Ready to merge.

@TerminalGravity

Copy link
Copy Markdown
Collaborator Author

Closing — superseded by newer PRs.

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