Skip to content

Add corpus-report command: readiness scorecard before first write #59

Description

@telivity-otaip

Why

New users ingest a messy LinkedIn dump and have no idea if the corpus is good enough for voice. A corpus-report (or status --verbose) that scores readiness drives successful first drafts and fewer "it sounds generic" issues.

Proposed command

personality-protect corpus-report
personality-protect corpus-report --json

Report sections (Contoso-safe aggregates only — never print piece text by default)

  1. Counts by source (linkedin_post, linkedin_article, email, note, …)
  2. Selection gate — how many pass select defaults; warn/block thresholds
  3. Length bands — p50/p75/p90 words for posts vs articles
  4. Date coverage — year histogram
  5. Dedup hint — count of near-duplicates (reuse corpus_dedupe logic)
  6. Article channel readiness — ≥5 articles in corpus + index?
  7. Style card status — present / stale vs selection
  8. Actionable next steps — e.g. "run index-voice", "ingest more articles"

Acceptance criteria

  • Command exists and is listed in README CLI reference
  • Default output is a Rich table/summary; --json emits machine-readable aggregates
  • Never dumps raw personal prose unless --show-samples N on an explicit local flag (samples stay off by default; docs warn not to paste into issues)
  • Unit tests with demo/synthetic fixtures
  • status can link to or embed a short "run corpus-report for details" tip

Pointers

  • select.py, style_profile.py, corpus_dedupe.py, cli.py status
  • Demo profile via personality-protect demo

Difficulty

Easy–Medium — mostly composing existing metrics. Great for contributors learning the pipeline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions