patina-cli 3.11.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.patina.default.yaml +29 -29
- package/CHANGELOG.md +53 -0
- package/NOTICE +21 -0
- package/README.md +117 -224
- package/README_JA.md +134 -77
- package/README_KR.md +132 -74
- package/README_ZH.md +137 -80
- package/SKILL.md +11 -20
- package/artifacts/rebaseline-2025/README.md +147 -0
- package/artifacts/rebaseline-2025/human-controls.public.jsonl +250 -0
- package/artifacts/rebaseline-2025/intake.example.jsonl +2 -0
- package/artifacts/rebaseline-2025/intake.local.example.jsonl +25 -0
- package/artifacts/rebaseline-2025/prompts.template.jsonl +7 -0
- package/artifacts/rebaseline-2025/sources.ko-public.jsonl +39 -0
- package/assets/brand/patina-badge.svg +18 -0
- package/assets/brand/patina-mark.svg +8 -0
- package/assets/demo/README.md +79 -0
- package/core/scoring.md +12 -12
- package/core/standalone-prompt.md +3 -1
- package/core/stylometry.md +93 -22
- package/docs/API.md +1554 -0
- package/docs/AUTHENTICATION.md +50 -26
- package/docs/AUTHENTICATION_KR.md +54 -29
- package/docs/BRANDING.md +9 -8
- package/docs/CLI.md +55 -14
- package/docs/COOKBOOK.md +8 -21
- package/docs/DEMO.md +32 -5
- package/docs/EXIT-CODES.md +2 -3
- package/docs/FALSE-POSITIVES.md +63 -0
- package/docs/FAQ.md +9 -1
- package/docs/FAQ_KR.md +3 -1
- package/docs/FLAG-PARITY.md +33 -47
- package/docs/ISSUE-WAVES.md +57 -0
- package/docs/PATTERNS-EN.md +67 -3
- package/docs/PATTERNS-JA.md +68 -2
- package/docs/PATTERNS-KO.md +70 -7
- package/docs/PATTERNS-ZH.md +67 -3
- package/docs/PATTERNS.md +5 -5
- package/docs/RESEARCH-DOCS-PLATFORM.md +54 -0
- package/docs/ROADMAP.md +46 -66
- package/docs/TRANSLATIONESE-KO.md +51 -0
- package/docs/audits/2026-05-deep-research.md +3 -1
- package/docs/benchmarks/README.md +51 -0
- package/docs/benchmarks/detector-comparison.json +69 -9
- package/docs/benchmarks/detector-comparison.md +10 -5
- package/docs/benchmarks/katfish-ko-latest.json +657 -0
- package/docs/benchmarks/katfish-ko-latest.md +77 -0
- package/docs/benchmarks/latest.json +1183 -108
- package/docs/benchmarks/latest.md +84 -60
- package/docs/benchmarks/lexicon-freshness-en-2026-05-22.json +1121 -0
- package/docs/benchmarks/lexicon-freshness-en-2026-05-22.md +136 -0
- package/docs/benchmarks/rebaseline-latest.json +381 -0
- package/docs/benchmarks/rebaseline-latest.md +121 -0
- package/docs/benchmarks/register-stratified-latest.json +164 -0
- package/docs/benchmarks/register-stratified-latest.md +99 -0
- package/docs/benchmarks/register-stratified.md +43 -0
- package/docs/integrations/github-action.md +44 -11
- package/docs/integrations/playground.md +58 -0
- package/docs/integrations/pre-commit.md +5 -5
- package/docs/integrations/release.md +5 -3
- package/docs/integrations/static-sites.md +83 -0
- package/docs/research/2025-rebaseline-plan.md +71 -2
- package/docs/research/2026-rebaseline.md +102 -0
- package/docs/research/adversarial-mps.md +41 -0
- package/docs/research/ai-human-metrics.md +35 -23
- package/docs/research/human-eval-panel.md +42 -0
- package/docs/research/judge-agreement.md +24 -0
- package/docs/research/ko-2025-corpus-sources.md +135 -0
- package/docs/research/lexicon-freshness-audit.md +64 -0
- package/docs/research/zh-ja-lexicon-calibration.md +60 -0
- package/docs/social/patina-launch-copy.md +173 -100
- package/docs/social/patina-launch-execution.md +94 -0
- package/docs/social/patina-launch-korean-first.md +83 -0
- package/docs/social/signs-of-ai-writing.md +26 -0
- package/docs/social/signs-of-ai-writing_KR.md +26 -0
- package/lexicon/ai-en.md +21 -24
- package/lexicon/ai-ja.md +158 -0
- package/lexicon/ai-ko.md +9 -9
- package/lexicon/ai-zh.md +158 -0
- package/lexicon/provenance/ai-en.json +970 -0
- package/lexicon/provenance/ai-ja.json +542 -0
- package/lexicon/provenance/ai-ko.json +866 -0
- package/lexicon/provenance/ai-zh.json +542 -0
- package/package.json +49 -8
- package/patterns/en-communication.md +5 -0
- package/patterns/en-content.md +5 -0
- package/patterns/en-filler.md +5 -0
- package/patterns/en-language.md +29 -1
- package/patterns/en-structure.md +5 -0
- package/patterns/en-style.md +5 -0
- package/patterns/en-viral-hook.md +42 -2
- package/patterns/ja-communication.md +5 -0
- package/patterns/ja-content.md +5 -0
- package/patterns/ja-filler.md +5 -0
- package/patterns/ja-language.md +33 -1
- package/patterns/ja-structure.md +12 -0
- package/patterns/ja-style.md +5 -0
- package/patterns/ja-viral-hook.md +41 -2
- package/patterns/ko-communication.md +5 -0
- package/patterns/ko-content.md +5 -0
- package/patterns/ko-filler.md +5 -0
- package/patterns/ko-language.md +33 -1
- package/patterns/ko-structure.md +25 -6
- package/patterns/ko-style.md +5 -0
- package/patterns/ko-viral-hook.md +38 -2
- package/patterns/zh-communication.md +5 -0
- package/patterns/zh-content.md +5 -0
- package/patterns/zh-filler.md +5 -0
- package/patterns/zh-language.md +37 -1
- package/patterns/zh-structure.md +12 -0
- package/patterns/zh-style.md +5 -0
- package/patterns/zh-viral-hook.md +38 -2
- package/playground/README.md +55 -0
- package/playground/analytics.js +4 -0
- package/playground/analyzer.js +883 -0
- package/playground/app.js +157 -0
- package/playground/data/lexicons.js +343 -0
- package/playground/index.html +138 -0
- package/playground/styles.css +267 -0
- package/profiles/namuwiki.md +111 -0
- package/scripts/adversarial-mps-report.mjs +201 -0
- package/scripts/badge-json.mjs +79 -0
- package/scripts/benchmark-report.mjs +56 -9
- package/scripts/check-release-metadata.mjs +0 -2
- package/scripts/detector-comparison.mjs +7 -7
- package/scripts/generate-playground-data.mjs +77 -0
- package/scripts/katfish-calibration.mjs +464 -0
- package/scripts/lexicon-freshness.mjs +485 -0
- package/scripts/lint.mjs +1 -1
- package/scripts/precommit-score.mjs +4 -3
- package/scripts/prose-score.mjs +81 -5
- package/scripts/rebaseline-intake.mjs +242 -0
- package/scripts/rebaseline-score.mjs +268 -0
- package/scripts/rebaseline-summary.mjs +773 -0
- package/scripts/rebaseline-web-collect.mjs +410 -0
- package/scripts/update-benchmark-ranges.mjs +1 -0
- package/src/api.js +69 -105
- package/src/auth.js +50 -2
- package/src/backends/claude-cli.js +19 -4
- package/src/backends/codex-cli.js +19 -3
- package/src/backends/contract.js +230 -1
- package/src/backends/gemini-cli.js +18 -5
- package/src/backends/index.js +87 -12
- package/src/backends/kimi-cli.js +161 -0
- package/src/cli.js +577 -567
- package/src/commands/doctor.js +2 -2
- package/src/config.js +29 -0
- package/src/errors.js +53 -1
- package/src/features/discourse-tells.js +68 -0
- package/src/features/index.js +82 -8
- package/src/features/lexicon.js +40 -6
- package/src/features/markup-leakage.js +69 -0
- package/src/features/segment.js +41 -0
- package/src/features/signal-strength.js +81 -0
- package/src/features/stylometry.js +231 -1
- package/src/features/translationese.js +127 -0
- package/src/loader.js +76 -0
- package/src/logger.js +22 -23
- package/src/model-defaults.js +55 -0
- package/src/ouroboros.js +31 -0
- package/src/output.js +102 -90
- package/src/prompt-builder.js +103 -68
- package/src/providers.js +51 -4
- package/src/scoring.js +210 -2
- package/src/security.js +75 -0
- package/tests/fixtures/live-quality/en/public-docs-01.md +26 -0
- package/tests/fixtures/live-quality/ko/public-docs-01.md +26 -0
- package/tests/fixtures/suspect-zones/expected-ranges.json +207 -16
- package/tests/fixtures/suspect-zones/ja/ai/ja-ai-04-lexicon.md +11 -0
- package/tests/fixtures/suspect-zones/ja/natural/ja-nat-04-lexicon-cold.md +11 -0
- package/tests/fixtures/suspect-zones/ko/ai/ko-ai-02.md +4 -5
- package/tests/fixtures/suspect-zones/ko/ai/ko-ai-07-ko-diagnostic.md +11 -0
- package/tests/fixtures/suspect-zones/zh/ai/zh-ai-04-lexicon.md +11 -0
- package/tests/fixtures/suspect-zones/zh/natural/zh-nat-04-lexicon-cold.md +11 -0
- package/tests/quality/README.md +188 -11
- package/tests/quality/adversarial-mps/fixtures.jsonl +10 -0
- package/tests/quality/benchmark.mjs +39 -1
- package/tests/quality/dogfood.mjs +5 -3
- package/tests/quality/live-fixtures.jsonl +2 -0
- package/tests/quality/live-quality.mjs +596 -0
- package/tests/quality/ranking-metrics.mjs +136 -0
- package/tests/quality/rebaseline-manifest.example.jsonl +5 -0
- package/vercel.json +53 -0
- package/SKILL-MAX.md +0 -455
- package/docs/internal/HARNESS.md +0 -14
- package/docs/internal/README.md +0 -14
- package/docs/internal/WARP.md +0 -23
- package/patina-max/SKILL.md +0 -523
- package/patina-max/composite.py +0 -457
- package/src/cache.js +0 -106
- package/src/commands/init.js +0 -208
- package/src/manifest.js +0 -162
- package/src/max-mode.js +0 -207
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Rebaseline 2025 local workspace
|
|
2
|
+
|
|
3
|
+
This directory is the local/private work area for the 2025+ rebaseline corpus.
|
|
4
|
+
It is intentionally ignored by default so vendor text, licensed corpora, and
|
|
5
|
+
review notes do not slip into the public repository.
|
|
6
|
+
|
|
7
|
+
Tracked files in this folder are scaffolding only:
|
|
8
|
+
|
|
9
|
+
- `.gitignore` keeps collected rows local unless explicitly allowlisted.
|
|
10
|
+
- `intake.example.jsonl` is a tiny repo-owned fixture for smoke testing the
|
|
11
|
+
intake helper. It is not benchmark evidence.
|
|
12
|
+
- `prompts.template.jsonl` contains repo-owned Korean prompt anchors for the
|
|
13
|
+
pilot. Copy rows into a local prompt/run sheet before generation.
|
|
14
|
+
- `intake.local.example.jsonl` is a 25-row Korean pilot skeleton. It validates
|
|
15
|
+
as metadata only; replace placeholder hashes locally before using it as
|
|
16
|
+
evidence.
|
|
17
|
+
- `sources.ko-public.jsonl` is a source inventory for collecting larger Korean
|
|
18
|
+
public-web human controls into ignored private files. It stores URLs and
|
|
19
|
+
license notes only, not page text.
|
|
20
|
+
- `human-controls.public.jsonl` is a 250-row Korean web human-control candidate
|
|
21
|
+
manifest with 50 rows in each tracked Korean register. It contains source
|
|
22
|
+
metadata and `sha256` digests only; the raw extracts stay in ignored
|
|
23
|
+
`private/` intake files. It is false-positive intake evidence, not a public
|
|
24
|
+
performance claim.
|
|
25
|
+
- `rebaseline-2026.scored.public.jsonl` is the #155 claim-ready public manifest
|
|
26
|
+
for the 2026-05-22 KO+EN modern-model rebaseline. It contains 600 generated
|
|
27
|
+
positive rows plus 200 human controls, all hash-only with deterministic score
|
|
28
|
+
metadata and no raw text.
|
|
29
|
+
|
|
30
|
+
## Local intake flow
|
|
31
|
+
|
|
32
|
+
Create a local file such as `intake.local.jsonl` with one JSON object per row.
|
|
33
|
+
Rows use the schema from `docs/research/2025-rebaseline-plan.md`.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm run benchmark:rebaseline:intake -- \
|
|
37
|
+
--input artifacts/rebaseline-2025/intake.local.jsonl \
|
|
38
|
+
--public-output artifacts/rebaseline-2025/manifest.public.jsonl \
|
|
39
|
+
--private-output artifacts/rebaseline-2025/private/generations.private.jsonl \
|
|
40
|
+
--require-source-review
|
|
41
|
+
|
|
42
|
+
node scripts/rebaseline-summary.mjs \
|
|
43
|
+
--input artifacts/rebaseline-2025/manifest.public.jsonl \
|
|
44
|
+
--json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The intake helper computes missing `text_hash` values. If a row carries `text`
|
|
48
|
+
but `redistribution` is `metadata-only`, `private`, `no-redistribution`,
|
|
49
|
+
`hash-only`, or an unrecognized value, the public manifest keeps only metadata
|
|
50
|
+
and the hash. The full text is written to the private output path.
|
|
51
|
+
`--require-source-review` fails any non-public row that lacks `source_review`
|
|
52
|
+
or `reviewer_notes`; use it before sharing a pilot report.
|
|
53
|
+
|
|
54
|
+
To smoke-check the tracked 25-row skeleton:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm run benchmark:rebaseline:intake -- \
|
|
58
|
+
--input artifacts/rebaseline-2025/intake.local.example.jsonl \
|
|
59
|
+
--dry-run \
|
|
60
|
+
--require-source-review
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
To validate the tracked web human-control candidates:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
node scripts/rebaseline-summary.mjs \
|
|
67
|
+
--input artifacts/rebaseline-2025/human-controls.public.jsonl \
|
|
68
|
+
--json
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
To collect more Korean public-web candidates into the private workspace:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npm run benchmark:rebaseline:web -- \
|
|
75
|
+
--input artifacts/rebaseline-2025/sources.ko-public.jsonl \
|
|
76
|
+
--output artifacts/rebaseline-2025/private/web-human-controls.generated.private.jsonl \
|
|
77
|
+
--target-per-register 50 \
|
|
78
|
+
--max-per-source 12 \
|
|
79
|
+
--collected-at 2026-05-22
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
This script deliberately writes raw text only under `private/`. The repository
|
|
83
|
+
uses MIT for its own code and documentation, but that license does not relicense
|
|
84
|
+
third-party web pages. Keep web extracts hash-only unless the exact row has a
|
|
85
|
+
redistribution review that permits publishing the text.
|
|
86
|
+
|
|
87
|
+
To run the private KatFish KO calibration after downloading `essay.jsonl`, `abstract.jsonl`, and `poetry.jsonl` into `artifacts/rebaseline-2025/private/katfish/`:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npm run benchmark:katfish-ko -- --write --basename katfish-ko-latest
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The command writes only aggregate metrics to `docs/benchmarks/`; it must not
|
|
94
|
+
commit KatFish raw rows unless a license review explicitly allows it.
|
|
95
|
+
|
|
96
|
+
To refresh their deterministic score/outcome fields from a private raw-text
|
|
97
|
+
intake file:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npm run benchmark:rebaseline:score -- \
|
|
101
|
+
--input artifacts/rebaseline-2025/private/web-human-controls.generated.private.jsonl \
|
|
102
|
+
--output artifacts/rebaseline-2025/human-controls.public.jsonl \
|
|
103
|
+
--scored-at 2026-05-22
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## 2026 modern-model claim flow
|
|
107
|
+
|
|
108
|
+
The #155 claim-ready flow uses ignored raw model output and then commits only a
|
|
109
|
+
hash-only scored manifest:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npm run benchmark:rebaseline:generate-modern -- \
|
|
113
|
+
--per-cell 100 \
|
|
114
|
+
--batch-size 50 \
|
|
115
|
+
--generated-at 2026-05-22
|
|
116
|
+
|
|
117
|
+
npm run benchmark:rebaseline:claim-manifest -- \
|
|
118
|
+
--scored-at 2026-05-22
|
|
119
|
+
|
|
120
|
+
node scripts/rebaseline-summary.mjs \
|
|
121
|
+
--input artifacts/rebaseline-2025/rebaseline-2026.scored.public.jsonl \
|
|
122
|
+
--write \
|
|
123
|
+
--basename rebaseline-latest \
|
|
124
|
+
--require-claim-ready
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
`benchmark:rebaseline:generate-modern` writes raw model text under
|
|
128
|
+
`private/modern-generations.private.jsonl`; do not commit that file. The
|
|
129
|
+
checked-in claim surface is `rebaseline-2026.scored.public.jsonl` plus
|
|
130
|
+
`docs/benchmarks/rebaseline-latest.{md,json}`.
|
|
131
|
+
|
|
132
|
+
## What can be committed
|
|
133
|
+
|
|
134
|
+
Do commit:
|
|
135
|
+
|
|
136
|
+
- source inventory and protocols under `docs/research/`
|
|
137
|
+
- hash-only candidate manifests that pass strict provenance review
|
|
138
|
+
- sanitized reports under `docs/benchmarks/` after review
|
|
139
|
+
- repo-owned examples with `redistribution: "repo-ok"`
|
|
140
|
+
|
|
141
|
+
Do not commit:
|
|
142
|
+
|
|
143
|
+
- raw KatFish/Modu/learner-corpus text until the license review explicitly says
|
|
144
|
+
redistribution is allowed
|
|
145
|
+
- vendor-generated samples copied from a UI if the provider terms do not allow
|
|
146
|
+
redistribution
|
|
147
|
+
- human reviewer notes containing private names, accounts, or unpublished text
|