Skip to content

test(maturity-scoring): add unit tests for Fluency Score logic#598

Merged
rajbos merged 1 commit intomainfrom
test/maturity-scoring-coverage
Apr 12, 2026
Merged

test(maturity-scoring): add unit tests for Fluency Score logic#598
rajbos merged 1 commit intomainfrom
test/maturity-scoring-coverage

Conversation

@rajbos
Copy link
Copy Markdown
Owner

@rajbos rajbos commented Apr 11, 2026

Summary

Adds 33 unit tests for maturityScoring.ts -- the module with zero test coverage that drives the AI Engineering Fluency Score, the product's core differentiating feature.

What's tested

  • calculateFluencyScoreForTeamMember (all 6 scoring categories):
    • Prompt Engineering: stage thresholds at exactly 5/30/100 interactions, slash command combos, avgTurns boosters, model-switching booster
    • Context Engineering: stage thresholds at 1 ref / 3 types+10 total / 5 types+30 total, image attachment booster
    • Agentic: agent mode detection, 50-interactions + 5-non-auto-tools Stage 4 path
    • Tool Usage: zero-tools Stage 1, 2 MCP servers Stage 4, 1 MCP server stays below Stage 4
    • Customization: no-repos Stage 1, 1 customized repo Stage 2, 5+ unique models booster
    • Workflow Integration: session count thresholds, full Stage 4 combination
    • Overall median calculation: verifies all 6 category names present, all-zeros => Stage 1
  • calculateMaturityScores (async personal view):
    • Stage 1 for empty stats; higher stage for active usage; all expected fields present; useCache flag forwarded correctly

Approach

All tests use plain inline object construction -- no mocks, no external dependencies.

…amMember and calculateMaturityScores

Cover all 6 scoring categories (Prompt Engineering, Context Engineering, Agentic,
Tool Usage, Customization, Workflow Integration) with boundary-value tests at each
threshold. Also test the median-of-6 overall stage calculation and verify the async
calculateMaturityScores function forwards its useCache flag and returns all expected
response fields.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rajbos rajbos merged commit 3626f29 into main Apr 12, 2026
16 checks passed
@rajbos rajbos deleted the test/maturity-scoring-coverage branch April 12, 2026 08:29
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