feat: add cb health-check command (extract → eval → gap report)#78
Open
rajnavakoti wants to merge 1 commit into
Open
feat: add cb health-check command (extract → eval → gap report)#78rajnavakoti wants to merge 1 commit into
rajnavakoti wants to merge 1 commit into
Conversation
Package the full pipeline into one command: given a folder of docs, extract entities, run coverage evals, and produce a gap report — no prior 'cb init' required. Exit code reflects a configurable coverage threshold, usable as a deployment gate. - New `cb health-check` command in cli.py - Shared run_coverage_eval() helper in evals.py (KB load + embed + retrieval + coverage report), reusable by cb eval later - Synthesizes a minimal seed when none is provided - Tests: pass/fail threshold exit codes, seed synthesis, summary output, and missing-docs validation Closes #26 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Packages the full pipeline into a single command —
cb health-check ./docs/runs extract → eval → gap report and prints a knowledge-health summary. No priorcb initrequired. This is the "free health check" flow for conference/design-partner outreach.Exit code is a deployment gate: 0 if CLEAN coverage ≥ threshold, else 1.
What it does
Changes
context_blocks/cli.py— newhealth-checkcommand (mostly orchestration of existing pieces)context_blocks/retrieval/evals.py— extracted a sharedrun_coverage_eval()helper (KB load + embed + retrieval + coverage report), so the eval flow is reusabletests/unit/test_health_check.py— newTest plan
Follow-ups (not in this PR)
cb evalcommand to also userun_coverage_eval()(DRY) — kept separate here to keep the change low-risk.Closes #26
🤖 Generated with Claude Code