Skip to content

Span-level human score: Flag and FlagReason on Score (offsets only) - #15

Merged
ParallelEntrepreneur merged 1 commit into
mainfrom
colonizer/issue-4-c01872c5
Oct 10, 2026
Merged

ParallelEntrepreneur merged 1 commit into
mainfrom
colonizer/issue-4-c01872c5

Conversation

@ParallelEntrepreneur

@ParallelEntrepreneur ParallelEntrepreneur commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Part of #4. Split: this PR carries only the open-core half of the human-score work: the wire shape and the port contract. The stylometric detector, its measurements and the CLI opt-in are hosted-only. They moved to the private hosted repository (Ghostwritin/ghostwritin-cloud#2), which depends on this PR's head commit through an exact git pin. The branch was rebuilt on current main.

What changed (open)

  • Score gains #[serde(default)] flags: Vec<Flag>.
    • A Flag is { start, end, reason }: byte offsets on char boundaries into the scored text. score_before indexes the request text and score_after indexes the rewrite.
    • Flags may overlap or nest and carry no words.
  • FlagReason (#[non_exhaustive]): stock_phrase, uniform_rhythm.
  • HumanScore port docs: an implementation stores and logs nothing, and its flags are offsets, never text.
  • The wire-shape test covers flags and a score from before they existed.
  • README: a short note on the score's shape under the API example.

The open API, Worker and CLI still ship NoHumanScore, so both scores are null, and the README status line is unchanged.

Moved to the private repository

  • The crates/ghostwritin-detect crate (the Stylometric heuristic, the evaluate example and its tests).
  • The CLI --human-score flag, now a ghostwritin-cloud binary there.
  • The README "Human score" section with the measured HC3 and RAID error rates.

Verification (local; Actions is billing-blocked)

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --workspace
  • cargo build --target wasm32-unknown-unknown -p ghostwritin-worker

The open half of the human-score work: the wire shape and the port
contract. The stylometric detector, its measurements and the CLI opt-in
are hosted-only and live in the private Ghostwritin/ghostwritin-cloud
repository; the open build still ships NoHumanScore.

- Score gains #[serde(default)] flags: Vec<Flag>. A Flag is
  { start, end, reason }: byte offsets on char boundaries into the scored
  text (score_before indexes the request text, score_after the rewrite).
  Flags may overlap or nest and carry no words.
- FlagReason (non_exhaustive): stock_phrase, uniform_rhythm.
- The HumanScore port docs say an implementation stores and logs nothing
  and that flags are offsets, never text.
- The wire-shape test covers flags and a score from before they existed.

Co-authored-by: Colonizer Settlers <331648616+colonizer-settlers@users.noreply.github.com>
@ParallelEntrepreneur ParallelEntrepreneur changed the title Human score: a measured stylometric detector with flagged passages behind the HumanScore port Span-level human score: Flag and FlagReason on Score (offsets only) Oct 10, 2026
@ParallelEntrepreneur
ParallelEntrepreneur merged commit bc2c124 into main Oct 10, 2026
1 check passed
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