Skip to content

test: add 22 tests for prompt_score scoring logic#43

Closed
TerminalGravity wants to merge 4 commits intomainfrom
test/prompt-score-coverage-v2
Closed

test: add 22 tests for prompt_score scoring logic#43
TerminalGravity wants to merge 4 commits intomainfrom
test/prompt-score-coverage-v2

Conversation

@TerminalGravity
Copy link
Copy Markdown
Collaborator

Adds comprehensive test coverage for the scorePrompt function:

  • Exports scorePrompt so tests can import directly (no logic duplication)
  • Tests all 4 scoring dimensions: specificity, scope, actionability, done condition
  • Tests grading thresholds, feedback generation, edge cases (empty string, case insensitivity)
  • 22 new tests, all 65 total passing

No behavioral changes — just export visibility + tests.

… and contracts

The README references .preflight/ config extensively but there were no
concrete example files to copy. This adds a ready-to-use examples/.preflight/
directory with annotated config.yml, triage.yml, and contracts/api.yml,
plus a README explaining how to use them.
Created examples/USAGE_EXAMPLES.md with 8 real-world scenarios showing
what each tool looks like in practice: preflight_check catching vague
prompts, scope_work creating execution plans, enrich_agent_task for
sub-agents, sharpen_followup resolving ambiguity, session health checks,
semantic history search, weekly scorecards, and prompt grading.

Added link to usage examples in README nav bar.
- Export scorePrompt for direct testing
- Cover all 4 scoring dimensions (specificity, scope, actionability, done condition)
- Test grading thresholds, feedback generation, edge cases
- All 65 tests passing
@TerminalGravity
Copy link
Copy Markdown
Collaborator Author

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