Commit Graph

13 Commits

Author SHA1 Message Date
Francisco Quinteros 73f437bd77 docs: document gate threshold measurement 2026-09-11 15:18:38 -07:00
Francisco Quinteros 1a8e89eedb docs: document oversized gate input failure 2026-09-11 15:02:01 -07:00
Francisco Quinteros 777997a31d docs: explain deterministic gate contract 2026-09-11 14:09:07 -07:00
Conor Bronsdon 728542552f Merge remote-tracking branch 'origin/main' into pr-164
# Conflicts:
#	CHANGELOG.md
2026-09-11 13:16:10 -07:00
Conor Bronsdon 3a6ac69a99 docs: make npx package resolution explicit 2026-09-11 12:44:24 -07:00
CodeBarrie 2bf7093fea docs: correct the analyzeText result contract
Three rows of detector/README.md describe values the engine does not
return. The npm package exposes analyzeText as its only entry point, so
a caller branching on these gets code that never matches.

- label: getLabel() returns six scored strings, and the four listed were
  truncated forms of them. Clean (score 0) and Moderate AI signals
  (36-60) were missing, and the real strings carry an "AI signals" or
  "AI patterns" suffix, so `label === "Minimal"` is never true.
- document_classification: the early-exit paths return a fourth value,
  UNSCORED, on empty, too-short, and too-long input. Documented with the
  rest of that result shape, since score 0 alone cannot distinguish
  unscored input from clean text.
- contextMode: VALID_CONTEXT_MODES accepts four modes, not two. Passing
  marketing or personal is valid and is reported in stats.contextMode;
  only technical currently changes what gets flagged, which the text now
  says rather than implying the other two are rejected.

Verified against the engine:

  node -e "const D=require('./detector/patterns.js'); for (const s of [0,1,15,16,35,36,60,61,80,81,100]) console.log(s, D.getLabel(s))"
  node -e "const D=require('./detector/patterns.js'); console.log(D.analyzeText('').document_classification)"

No behavior change. npm test and self-scan:check pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015w3yGvreSY5CLyBG7zgCKK
2026-09-11 12:27:11 -07:00
shahriariqbal 3658dd50a0 fix: address review feedback (validate args before --help, -- separator, avoid forced exit, changelog entry) 2026-09-11 22:22:26 +03:00
shahriariqbal 8bbb78d519 feat: add a zero-dependency CLI for files and stdin (#158) 2026-09-11 22:07:20 +03:00
Francisco Quinteros 878f93d5c7 docs: distinguish npm local and browser detector usage 2026-09-11 11:14:41 -07:00
Conor Bronsdon 0aa0def0ee Split canonical skill and ship complete Claude bundle 2026-09-05 12:34:24 -07:00
jeffhuen 4e79a67871 feat: add rendered Markdown source mode (#137)
* feat: add rendered Markdown source mode

* fix: address rendered Markdown review regressions

* fix: close rendered HTML comments before code masking

---------

Co-authored-by: Conor Bronsdon <120674402+conorbronsdon@users.noreply.github.com>
2026-08-28 11:59:06 -07:00
Conor Bronsdon fba57d3c38 Enforcement, self-scan proof, and the first measured accuracy numbers (v3.22.0) (#68)
Adds a preservation validator, a self-scan with PROOF.md, over-correction guardrails, a false-positive intake, and a two-class control corpus with the project's first FPR, TPR, and AUC.

Splits Tier 1 into 1A frequency markers and 1B clarity edits, and fixes two detector defects the measurement found (#67, #69).

Findings and open decisions: #70, #71, #72, #73.
2026-07-30 22:53:01 -07:00
Conor Bronsdon 2b38cd7ae2 Make repo SSOT for the detection engine (#16)
* feat: make repo SSOT for the detection engine

Extract the 43-category detection engine + its dependency-free node test
harness from the (winding-down) private web-app repo into detector/, so this
open-source repo is now the canonical source of truth for both the rules
(SKILL.md) and their executable expression (detector/patterns.js).

- detector/patterns.js: zero-dep, build-step-free, runs in node>=18 + browser
- detector/patterns.test.js: 60 fixtures, no deps (node:assert)
- package.json + CI: `npm test` on push/PR touching detector/
- detector/CATEGORIES.md: anti-drift map of SKILL.md sections <-> detector types
- README: "Run the detector" section

The cert/attestation/x402/token layer stays behind in the private app; the
engine is a pure function with no knowledge of it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: reclassify smart-punct-signature as a partial skill map

Community PR #15 adds a curly-quotation-marks rule under SKILL.md's
Formatting section, so smart-punct-signature is no longer detector-only.
Move it from section B to a partial mapping in section A, noting that the
detector requires 4-signal co-occurrence while the skill rule treats curly
quotes as a weak corroborating signal — the two agree in spirit but differ
in mechanism.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test: enforce CATEGORIES.md contract; docs: contributor guide + count clarity

- detector/categories.test.js: asserts every detector type is documented in
  CATEGORIES.md and no stale type rows remain; wired into `npm test`.
- README + CATEGORIES.md: note that the 42 prose patterns, 43 detector types,
  and ~50 SKILL.md sections are different counts on purpose — don't reconcile.
- CONTRIBUTING.md + PR template: encode the regex-vs-judgment decision, the
  precision-over-recall bias, npm test, the clean-prose bar, and changelog/
  version conventions — the things the first community PR surfaced by hand.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: require contributors to cite sources for empirical claims

Rules that assert how AI or humans write get fact-checked; some turn out
wrong (e.g. the curly-quote premise). Add a "Cite your sources" section to
CONTRIBUTING.md and a checklist item to the PR template.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test: require detector types to appear in a CATEGORIES.md table, not just prose

Tighten the anti-drift check so a type "documented" by a stray backtick
mention in prose no longer satisfies the gate — it has to land in an actual
mapping-table row, matching the test's own summary line.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 23:58:20 -07:00