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.
Files changed (193) hide show
  1. package/.patina.default.yaml +29 -29
  2. package/CHANGELOG.md +53 -0
  3. package/NOTICE +21 -0
  4. package/README.md +117 -224
  5. package/README_JA.md +134 -77
  6. package/README_KR.md +132 -74
  7. package/README_ZH.md +137 -80
  8. package/SKILL.md +11 -20
  9. package/artifacts/rebaseline-2025/README.md +147 -0
  10. package/artifacts/rebaseline-2025/human-controls.public.jsonl +250 -0
  11. package/artifacts/rebaseline-2025/intake.example.jsonl +2 -0
  12. package/artifacts/rebaseline-2025/intake.local.example.jsonl +25 -0
  13. package/artifacts/rebaseline-2025/prompts.template.jsonl +7 -0
  14. package/artifacts/rebaseline-2025/sources.ko-public.jsonl +39 -0
  15. package/assets/brand/patina-badge.svg +18 -0
  16. package/assets/brand/patina-mark.svg +8 -0
  17. package/assets/demo/README.md +79 -0
  18. package/core/scoring.md +12 -12
  19. package/core/standalone-prompt.md +3 -1
  20. package/core/stylometry.md +93 -22
  21. package/docs/API.md +1554 -0
  22. package/docs/AUTHENTICATION.md +50 -26
  23. package/docs/AUTHENTICATION_KR.md +54 -29
  24. package/docs/BRANDING.md +9 -8
  25. package/docs/CLI.md +55 -14
  26. package/docs/COOKBOOK.md +8 -21
  27. package/docs/DEMO.md +32 -5
  28. package/docs/EXIT-CODES.md +2 -3
  29. package/docs/FALSE-POSITIVES.md +63 -0
  30. package/docs/FAQ.md +9 -1
  31. package/docs/FAQ_KR.md +3 -1
  32. package/docs/FLAG-PARITY.md +33 -47
  33. package/docs/ISSUE-WAVES.md +57 -0
  34. package/docs/PATTERNS-EN.md +67 -3
  35. package/docs/PATTERNS-JA.md +68 -2
  36. package/docs/PATTERNS-KO.md +70 -7
  37. package/docs/PATTERNS-ZH.md +67 -3
  38. package/docs/PATTERNS.md +5 -5
  39. package/docs/RESEARCH-DOCS-PLATFORM.md +54 -0
  40. package/docs/ROADMAP.md +46 -66
  41. package/docs/TRANSLATIONESE-KO.md +51 -0
  42. package/docs/audits/2026-05-deep-research.md +3 -1
  43. package/docs/benchmarks/README.md +51 -0
  44. package/docs/benchmarks/detector-comparison.json +69 -9
  45. package/docs/benchmarks/detector-comparison.md +10 -5
  46. package/docs/benchmarks/katfish-ko-latest.json +657 -0
  47. package/docs/benchmarks/katfish-ko-latest.md +77 -0
  48. package/docs/benchmarks/latest.json +1183 -108
  49. package/docs/benchmarks/latest.md +84 -60
  50. package/docs/benchmarks/lexicon-freshness-en-2026-05-22.json +1121 -0
  51. package/docs/benchmarks/lexicon-freshness-en-2026-05-22.md +136 -0
  52. package/docs/benchmarks/rebaseline-latest.json +381 -0
  53. package/docs/benchmarks/rebaseline-latest.md +121 -0
  54. package/docs/benchmarks/register-stratified-latest.json +164 -0
  55. package/docs/benchmarks/register-stratified-latest.md +99 -0
  56. package/docs/benchmarks/register-stratified.md +43 -0
  57. package/docs/integrations/github-action.md +44 -11
  58. package/docs/integrations/playground.md +58 -0
  59. package/docs/integrations/pre-commit.md +5 -5
  60. package/docs/integrations/release.md +5 -3
  61. package/docs/integrations/static-sites.md +83 -0
  62. package/docs/research/2025-rebaseline-plan.md +71 -2
  63. package/docs/research/2026-rebaseline.md +102 -0
  64. package/docs/research/adversarial-mps.md +41 -0
  65. package/docs/research/ai-human-metrics.md +35 -23
  66. package/docs/research/human-eval-panel.md +42 -0
  67. package/docs/research/judge-agreement.md +24 -0
  68. package/docs/research/ko-2025-corpus-sources.md +135 -0
  69. package/docs/research/lexicon-freshness-audit.md +64 -0
  70. package/docs/research/zh-ja-lexicon-calibration.md +60 -0
  71. package/docs/social/patina-launch-copy.md +173 -100
  72. package/docs/social/patina-launch-execution.md +94 -0
  73. package/docs/social/patina-launch-korean-first.md +83 -0
  74. package/docs/social/signs-of-ai-writing.md +26 -0
  75. package/docs/social/signs-of-ai-writing_KR.md +26 -0
  76. package/lexicon/ai-en.md +21 -24
  77. package/lexicon/ai-ja.md +158 -0
  78. package/lexicon/ai-ko.md +9 -9
  79. package/lexicon/ai-zh.md +158 -0
  80. package/lexicon/provenance/ai-en.json +970 -0
  81. package/lexicon/provenance/ai-ja.json +542 -0
  82. package/lexicon/provenance/ai-ko.json +866 -0
  83. package/lexicon/provenance/ai-zh.json +542 -0
  84. package/package.json +49 -8
  85. package/patterns/en-communication.md +5 -0
  86. package/patterns/en-content.md +5 -0
  87. package/patterns/en-filler.md +5 -0
  88. package/patterns/en-language.md +29 -1
  89. package/patterns/en-structure.md +5 -0
  90. package/patterns/en-style.md +5 -0
  91. package/patterns/en-viral-hook.md +42 -2
  92. package/patterns/ja-communication.md +5 -0
  93. package/patterns/ja-content.md +5 -0
  94. package/patterns/ja-filler.md +5 -0
  95. package/patterns/ja-language.md +33 -1
  96. package/patterns/ja-structure.md +12 -0
  97. package/patterns/ja-style.md +5 -0
  98. package/patterns/ja-viral-hook.md +41 -2
  99. package/patterns/ko-communication.md +5 -0
  100. package/patterns/ko-content.md +5 -0
  101. package/patterns/ko-filler.md +5 -0
  102. package/patterns/ko-language.md +33 -1
  103. package/patterns/ko-structure.md +25 -6
  104. package/patterns/ko-style.md +5 -0
  105. package/patterns/ko-viral-hook.md +38 -2
  106. package/patterns/zh-communication.md +5 -0
  107. package/patterns/zh-content.md +5 -0
  108. package/patterns/zh-filler.md +5 -0
  109. package/patterns/zh-language.md +37 -1
  110. package/patterns/zh-structure.md +12 -0
  111. package/patterns/zh-style.md +5 -0
  112. package/patterns/zh-viral-hook.md +38 -2
  113. package/playground/README.md +55 -0
  114. package/playground/analytics.js +4 -0
  115. package/playground/analyzer.js +883 -0
  116. package/playground/app.js +157 -0
  117. package/playground/data/lexicons.js +343 -0
  118. package/playground/index.html +138 -0
  119. package/playground/styles.css +267 -0
  120. package/profiles/namuwiki.md +111 -0
  121. package/scripts/adversarial-mps-report.mjs +201 -0
  122. package/scripts/badge-json.mjs +79 -0
  123. package/scripts/benchmark-report.mjs +56 -9
  124. package/scripts/check-release-metadata.mjs +0 -2
  125. package/scripts/detector-comparison.mjs +7 -7
  126. package/scripts/generate-playground-data.mjs +77 -0
  127. package/scripts/katfish-calibration.mjs +464 -0
  128. package/scripts/lexicon-freshness.mjs +485 -0
  129. package/scripts/lint.mjs +1 -1
  130. package/scripts/precommit-score.mjs +4 -3
  131. package/scripts/prose-score.mjs +81 -5
  132. package/scripts/rebaseline-intake.mjs +242 -0
  133. package/scripts/rebaseline-score.mjs +268 -0
  134. package/scripts/rebaseline-summary.mjs +773 -0
  135. package/scripts/rebaseline-web-collect.mjs +410 -0
  136. package/scripts/update-benchmark-ranges.mjs +1 -0
  137. package/src/api.js +69 -105
  138. package/src/auth.js +50 -2
  139. package/src/backends/claude-cli.js +19 -4
  140. package/src/backends/codex-cli.js +19 -3
  141. package/src/backends/contract.js +230 -1
  142. package/src/backends/gemini-cli.js +18 -5
  143. package/src/backends/index.js +87 -12
  144. package/src/backends/kimi-cli.js +161 -0
  145. package/src/cli.js +577 -567
  146. package/src/commands/doctor.js +2 -2
  147. package/src/config.js +29 -0
  148. package/src/errors.js +53 -1
  149. package/src/features/discourse-tells.js +68 -0
  150. package/src/features/index.js +82 -8
  151. package/src/features/lexicon.js +40 -6
  152. package/src/features/markup-leakage.js +69 -0
  153. package/src/features/segment.js +41 -0
  154. package/src/features/signal-strength.js +81 -0
  155. package/src/features/stylometry.js +231 -1
  156. package/src/features/translationese.js +127 -0
  157. package/src/loader.js +76 -0
  158. package/src/logger.js +22 -23
  159. package/src/model-defaults.js +55 -0
  160. package/src/ouroboros.js +31 -0
  161. package/src/output.js +102 -90
  162. package/src/prompt-builder.js +103 -68
  163. package/src/providers.js +51 -4
  164. package/src/scoring.js +210 -2
  165. package/src/security.js +75 -0
  166. package/tests/fixtures/live-quality/en/public-docs-01.md +26 -0
  167. package/tests/fixtures/live-quality/ko/public-docs-01.md +26 -0
  168. package/tests/fixtures/suspect-zones/expected-ranges.json +207 -16
  169. package/tests/fixtures/suspect-zones/ja/ai/ja-ai-04-lexicon.md +11 -0
  170. package/tests/fixtures/suspect-zones/ja/natural/ja-nat-04-lexicon-cold.md +11 -0
  171. package/tests/fixtures/suspect-zones/ko/ai/ko-ai-02.md +4 -5
  172. package/tests/fixtures/suspect-zones/ko/ai/ko-ai-07-ko-diagnostic.md +11 -0
  173. package/tests/fixtures/suspect-zones/zh/ai/zh-ai-04-lexicon.md +11 -0
  174. package/tests/fixtures/suspect-zones/zh/natural/zh-nat-04-lexicon-cold.md +11 -0
  175. package/tests/quality/README.md +188 -11
  176. package/tests/quality/adversarial-mps/fixtures.jsonl +10 -0
  177. package/tests/quality/benchmark.mjs +39 -1
  178. package/tests/quality/dogfood.mjs +5 -3
  179. package/tests/quality/live-fixtures.jsonl +2 -0
  180. package/tests/quality/live-quality.mjs +596 -0
  181. package/tests/quality/ranking-metrics.mjs +136 -0
  182. package/tests/quality/rebaseline-manifest.example.jsonl +5 -0
  183. package/vercel.json +53 -0
  184. package/SKILL-MAX.md +0 -455
  185. package/docs/internal/HARNESS.md +0 -14
  186. package/docs/internal/README.md +0 -14
  187. package/docs/internal/WARP.md +0 -23
  188. package/patina-max/SKILL.md +0 -523
  189. package/patina-max/composite.py +0 -457
  190. package/src/cache.js +0 -106
  191. package/src/commands/init.js +0 -208
  192. package/src/manifest.js +0 -162
  193. package/src/max-mode.js +0 -207
@@ -0,0 +1,77 @@
1
+ # KatFish Korean Calibration
2
+
3
+ | field | value |
4
+ |---|---:|
5
+ | Generated at | 2026-05-21T16:25:42.849Z |
6
+ | KatFish input | `artifacts/rebaseline-2025/private/katfish` |
7
+ | Human-control input | `artifacts/rebaseline-2025/private/web-human-controls.generated.private.jsonl` |
8
+ | KatFish rows | 2094 |
9
+ | Public-web human-control rows | 250 |
10
+ | Raw text committed | 0 |
11
+
12
+ This report is aggregate-only. KatFish rows and public-web extracts stay in ignored private files because the external dataset and source pages have not been relicensed into this repository.
13
+
14
+ ## Headline
15
+
16
+ | metric | value |
17
+ |---|---:|
18
+ | KatFish catch rate, Patina without KO diagnostics | 58.9% |
19
+ | KatFish catch rate, Patina current | 74.8% |
20
+ | Delta | +15.9 pp |
21
+ | Public-web human-control FP delta | +0.0 pp (0 rows) |
22
+
23
+ ## KatFish metrics
24
+
25
+ | mode | n | accuracy | precision | recall / catch | F1 | FP rate | TP/FP/FN/TN |
26
+ |---|---:|---:|---:|---:|---:|---:|---:|
27
+ | burstiness_mattr_only | 2094 | 58.3% | 87.5% | 53.9% | 0.667 | 26.6% | 875/125/749/345 |
28
+ | patina_without_ko_diagnostics | 2094 | 61.6% | 87.5% | 58.9% | 0.704 | 29.1% | 957/137/667/333 |
29
+ | patina_current | 2094 | 69.8% | 84.4% | 74.8% | 0.793 | 47.7% | 1215/224/409/246 |
30
+
31
+ ## Public-web Korean human controls
32
+
33
+ | mode | n | accuracy | precision | recall / catch | F1 | FP rate | TP/FP/FN/TN |
34
+ |---|---:|---:|---:|---:|---:|---:|---:|
35
+ | burstiness_mattr_only | 250 | 87.2% | 0.0% | 0.0% | 0.000 | 12.8% | 0/32/0/218 |
36
+ | patina_without_ko_diagnostics | 250 | 83.2% | 0.0% | 0.0% | 0.000 | 16.8% | 0/42/0/208 |
37
+ | patina_current | 250 | 83.2% | 0.0% | 0.0% | 0.000 | 16.8% | 0/42/0/208 |
38
+
39
+ ## KatFish by genre
40
+
41
+ | genre | mode | n | recall / catch | FP rate | TP/FP/FN/TN |
42
+ |---|---|---:|---:|---:|---:|
43
+ | abstract | burstiness_mattr_only | 378 | 61.5% | 53.0% | 171/53/107/47 |
44
+ | abstract | patina_without_ko_diagnostics | 378 | 66.5% | 58.0% | 185/58/93/42 |
45
+ | abstract | patina_current | 378 | 71.6% | 67.0% | 199/67/79/33 |
46
+ | essay | burstiness_mattr_only | 771 | 35.6% | 8.8% | 210/16/380/165 |
47
+ | essay | patina_without_ko_diagnostics | 771 | 47.1% | 12.7% | 278/23/312/158 |
48
+ | essay | patina_current | 771 | 80.3% | 45.3% | 474/82/116/99 |
49
+ | poetry | burstiness_mattr_only | 945 | 65.3% | 29.6% | 494/56/262/133 |
50
+ | poetry | patina_without_ko_diagnostics | 945 | 65.3% | 29.6% | 494/56/262/133 |
51
+ | poetry | patina_current | 945 | 71.7% | 39.7% | 542/75/214/114 |
52
+
53
+ ## Public-web controls by register
54
+
55
+ | register | mode | n | recall / catch | FP rate | TP/FP/FN/TN |
56
+ |---|---|---:|---:|---:|---:|
57
+ | academic-summary | burstiness_mattr_only | 50 | 0.0% | 4.0% | 0/2/0/48 |
58
+ | academic-summary | patina_without_ko_diagnostics | 50 | 0.0% | 14.0% | 0/7/0/43 |
59
+ | academic-summary | patina_current | 50 | 0.0% | 14.0% | 0/7/0/43 |
60
+ | blog | burstiness_mattr_only | 50 | 0.0% | 20.0% | 0/10/0/40 |
61
+ | blog | patina_without_ko_diagnostics | 50 | 0.0% | 20.0% | 0/10/0/40 |
62
+ | blog | patina_current | 50 | 0.0% | 20.0% | 0/10/0/40 |
63
+ | chat-update | burstiness_mattr_only | 50 | 0.0% | 0.0% | 0/0/0/50 |
64
+ | chat-update | patina_without_ko_diagnostics | 50 | 0.0% | 4.0% | 0/2/0/48 |
65
+ | chat-update | patina_current | 50 | 0.0% | 4.0% | 0/2/0/48 |
66
+ | product-doc | burstiness_mattr_only | 50 | 0.0% | 12.0% | 0/6/0/44 |
67
+ | product-doc | patina_without_ko_diagnostics | 50 | 0.0% | 12.0% | 0/6/0/44 |
68
+ | product-doc | patina_current | 50 | 0.0% | 12.0% | 0/6/0/44 |
69
+ | technical-how-to | burstiness_mattr_only | 50 | 0.0% | 28.0% | 0/14/0/36 |
70
+ | technical-how-to | patina_without_ko_diagnostics | 50 | 0.0% | 34.0% | 0/17/0/33 |
71
+ | technical-how-to | patina_current | 50 | 0.0% | 34.0% | 0/17/0/33 |
72
+
73
+ ## Interpretation
74
+
75
+ - The KO diagnostics layer is evaluated against `patina_without_ko_diagnostics`, so the delta isolates the spacing/comma/suffix proxy path from existing lexicon behavior.
76
+ - The human-control non-regression gate uses the 250-row hash-only public-web Korean control set from #157.
77
+ - KatFish human rows are reported in the KatFish table as an OOD caveat; do not turn this binary catch-rate report into an authorship or public AUROC claim.