refactor: compact report format with 85% confidence threshold

- Update report format to match Gemini-style table output
- Add confidence threshold (85% default) to filter noise
- Add --show-all flag to display all violations
- Combine quote and explanation in single Description column
- Much cleaner output: 12 high-confidence vs 51 total violations
This commit is contained in:
Ben
2026-01-06 04:15:46 +00:00
parent e09f74578d
commit 6dd4e3b6db
2 changed files with 105 additions and 118 deletions

View File

@@ -66,6 +66,11 @@ def cli() -> None:
is_flag=True,
help="Show debug output including sample post content",
)
@click.option(
"--show-all",
is_flag=True,
help="Show all violations regardless of confidence (default: 85%+ only)",
)
def review(
username: str,
days: int,
@@ -75,6 +80,7 @@ def review(
max_posts: int,
enrich: bool,
debug: bool,
show_all: bool,
) -> None:
"""
Review a user's forum posts for potential rule violations.
@@ -101,6 +107,7 @@ def review(
max_posts=max_posts,
enrich=enrich,
debug=debug,
show_all=show_all,
)
)
@@ -126,6 +133,7 @@ async def _review_user(
max_posts: int,
enrich: bool,
debug: bool = False,
show_all: bool = False,
) -> None:
"""Async implementation of user review."""
try:
@@ -217,7 +225,8 @@ async def _review_user(
)
# Generate report
report_gen = ReportGenerator()
confidence_threshold = 0.0 if show_all else 0.85
report_gen = ReportGenerator(confidence_threshold=confidence_threshold)
# Print to terminal
report_gen.print_summary(user, analyses, days)