Skip to content

test: add unit tests for prompt_score scoring logic#167

Open
TerminalGravity wants to merge 6 commits intomainfrom
test/prompt-score
Open

test: add unit tests for prompt_score scoring logic#167
TerminalGravity wants to merge 6 commits intomainfrom
test/prompt-score

Conversation

@TerminalGravity
Copy link
Collaborator

@TerminalGravity TerminalGravity commented Mar 8, 2026

Adds 16 unit tests for the scorePrompt function covering all four scoring dimensions, grade boundaries, and feedback generation. Exports scorePrompt for testability.

Test count: 43 → 59 (+16)

Copy link
Collaborator Author

@TerminalGravity TerminalGravity left a comment

Choose a reason for hiding this comment

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

16 tests for prompt_score — nice. LGTM.

Adds a ready-to-use CLAUDE.md template that makes Claude Code
automatically run preflight_check on prompts. Users can copy it
into their project to get preflight working without manual tool calls.

Referenced from Quick Start in README and examples/README.
- CLI now responds to --help/-h with usage info, profiles, and links
- CLI now responds to --version/-v with package version
- Previously, any flag just launched the interactive wizard
- Fixed README badge from Node 18+ to Node 20+ (matches engines field)
Adds well-commented example config.yml and triage.yml to examples/.preflight/
so users can copy them into their project root and customize. Every field is
documented inline with descriptions of valid values and defaults.
Export scorePrompt function and add comprehensive tests covering:
- All four scoring dimensions (specificity, scope, actionability, done condition)
- Grade boundaries (A+ for perfect, F for vague)
- Feedback generation
- Total calculation
@TerminalGravity TerminalGravity changed the title test: add 16 tests for prompt_score scoring logic test: add unit tests for prompt_score scoring logic Mar 20, 2026
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