Skip to content

test: add tests for estimate_cost and prompt_score tools#292

Open
TerminalGravity wants to merge 5 commits intomainfrom
test/estimate-cost-prompt-score
Open

test: add tests for estimate_cost and prompt_score tools#292
TerminalGravity wants to merge 5 commits intomainfrom
test/estimate-cost-prompt-score

Conversation

@TerminalGravity
Copy link
Collaborator

Adds 14 tests across two tool test files:

  • estimate_cost (6 tests): session file analysis, correction detection, preflight tool counting, model-specific pricing, error handling
  • prompt_score (8 tests): all four scoring dimensions, grade assignment, vague vs specific prompts, session average tracking

Tool test coverage: 1/25 → 3/25. More coming.

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 a new export_report MCP tool that generates markdown reports from
timeline data. Includes:
- Daily activity breakdown with sparkline bars
- Prompt quality trend analysis (correction rate over time)
- Commit summary list
- Configurable period (day/week/month) and scope
- Recommendations when correction rate is high

Also adds 4 tests for the new tool.

Closes #5
The README references examples/.preflight/ but it didn't exist.
Adds well-commented starter configs:
- config.yml — profile, related projects, thresholds, embeddings
- triage.yml — triage rules with domain-specific keyword examples
- contracts/api.yml — sample manual contract definitions
- README.md — quick setup guide
- estimate_cost: 6 tests covering file analysis, correction detection,
  preflight tool counting, model pricing, and error handling
- prompt_score: 8 tests covering scoring dimensions (specificity, scope,
  actionability, done condition), grade assignment, and session tracking

Increases tool test coverage from 1/25 to 3/25.
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