Skip to content

pip package: contentforge-score (standalone scoring library, no API needed) #5

@CaptainFredric

Description

@CaptainFredric

Use case

Install the scoring heuristics directly without running the API server:

  • CI pipelines: fail the build if content scores below threshold
  • Pre-commit hooks: block low-quality drafts before commit
  • Jupyter notebooks: analyze content history in bulk
  • Offline environments: zero network required

What it would look like

pip install contentforge-score
from contentforge import score_tweet, score_linkedin_post

result = score_tweet("I just shipped a feature. Check it out.")
print(result["score"])         # 38
print(result["quality_gate"])  # FAILED
print(result["suggestions"])   # ["Add a hook...", "Include a number..."]

Why this is feasible

The scoring engine is:

  • Pure Python, zero ML dependencies (stdlib + regex only)
  • Fully deterministic — same input, same score, every time
  • Platform-specific rulesets already cleanly separated per function
  • The _quality_gate() helper and all scorer functions are self-contained

Splitting out the scorers from the API layer is a straightforward extraction. Package size would be <50KB.

Scope

  • Extract scorer functions + _quality_gate into contentforge_score/ package
  • pyproject.toml with zero-dep install
  • PyPI publish (pip install contentforge-score)
  • API server becomes a thin wrapper importing from the package
  • README section: "Use the scoring engine without the API"

Interest

Raised by lacyslab (r/webdev Top 1% commenter) on launch day:

"the platform-specific rulesets thing is genuinely the most useful part from a library standpoint... if you do spin it out as a pip package i'd use it."

+1 or comment if this is useful to you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions