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
package/README_JA.md
CHANGED
|
@@ -6,34 +6,60 @@
|
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
[](#クイックスタート)
|
|
8
8
|
[](https://github.com/devswha/patina)
|
|
9
|
-
[](CHANGELOG.md)
|
|
10
10
|
|
|
11
|
-
>
|
|
11
|
+
<p align="center">
|
|
12
|
+
<img src="assets/demo/patina-demo-en.gif" alt="patina が英語のAIっぽい文を整え、スコアを表示するターミナルデモGIF" width="780">
|
|
13
|
+
</p>
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://patina.vibetip.help/"><b>自分の文章で試す — インストール不要</b></a>
|
|
17
|
+
</p>
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
> **AIっぽさだけを落として、意味はそのまま。**
|
|
20
|
+
|
|
21
|
+
patina は、日本語・韓国語・英語・中国語の文章から AI っぽく見える表現を見つけ、主張・数値・極性・因果関係を変えずに整えます。[Claude Code](https://docs.anthropic.com/en/docs/claude-code)、[Codex CLI](https://github.com/openai/codex)、[Cursor](https://cursor.sh)、OpenCode 向けのスキルとして使うことも、単体の Node.js CLI として実行することもできます。
|
|
22
|
+
|
|
23
|
+
中身の見えない言い換えツールでも、AI 検出器を避けるためのツールでもありません。patina は **明確なパターンベースで監査可能**です。何をなぜ変更したか、原文の主張が保たれているかを示します。`codex`、`claude`、`gemini` CLI のいずれかにログイン済みなら、API キーなしでも使えます。
|
|
16
24
|
|
|
17
25
|
## デモ
|
|
18
26
|
|
|
19
|
-
**修正前** *(AI
|
|
20
|
-
>
|
|
27
|
+
**修正前** *(AI 風の文章;現在の GIF はこの英語サンプルを使用)*:
|
|
28
|
+
> The newly released Notion template pack is an **innovative solution** designed to **transform productivity** for modern teams. It offers 30 templates optimized for diverse workflows, with a user-friendly design that enables anyone to leverage them effortlessly. This product introduces a **new paradigm** for maximizing work efficiency.
|
|
29
|
+
|
|
30
|
+
**修正後** *(`/patina --lang en --tone marketing` — 事実はそのまま、AIっぽさだけを除去)*:
|
|
31
|
+
> If Notion still starts as a blank page for your team, open this pack first. It includes 30 templates for common workflows. Duplicate one, adjust the fields you need, and use it for a team project or your own planning without starting from scratch.
|
|
32
|
+
|
|
33
|
+
> **Score = 0.0%** · 30 個のテンプレート ✓ · ワークフローに合う ✓ · コピー後に調整して使える ✓
|
|
34
|
+
|
|
35
|
+
**ほかの例**
|
|
36
|
+
|
|
37
|
+
| 入力タイプ | 落とす AI っぽさ | 保つ内容 |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| 韓国語マーケティング | “혁신적인 솔루션”, “새로운 패러다임” | Notion テンプレート 30 個、ワークフローに合う、コピー後に編集して使える |
|
|
40
|
+
| 学術文体 | “획기적인 성과”, 広すぎる意義づけ | GitHub プロジェクト 60 個、72h→10m のセットアップ時間、p<0.01、限界の明記 |
|
|
41
|
+
| 技術文書 | “핵심적인 역할”, 未来標準のような誇張 | GPU 管理、1 コマンドでの準備、5× 結果の注意点 |
|
|
42
|
+
|
|
43
|
+
## ブラウザで試す — インストール不要
|
|
44
|
+
|
|
45
|
+
**[patina.vibetip.help](https://patina.vibetip.help/)** で、KO / EN / ZH / JA 段落の AI っぽい書き方のサインをブラウザ内で確認できます。
|
|
21
46
|
|
|
22
|
-
|
|
23
|
-
> コーヒーは、人の会い方をかなり変えてきたと思う。誰かと向かい合って座っているうちに自然と関係ができるし、文化が違う人同士でも会話が生まれやすくなる。
|
|
47
|
+
> **検出専用です。** playground は、決定的な文体統計分析だけをユーザーのブラウザ内で実行します。テキストを書き換えず、外部 LLM を呼び出さず、API キーをサーバーへ送りません。実際に書き換えたい場合は、下の CLI または skill を使ってください。
|
|
24
48
|
|
|
25
|
-
|
|
49
|
+
書き換えの流れは [30 秒ターミナルデモ](docs/DEMO.md) で確認できます。その他の例は [Before/After Gallery](docs/EXAMPLES.md)([한국어](docs/EXAMPLES_KR.md))にあります。
|
|
50
|
+
ブランドリソース: [logo](assets/brand/patina-logo.svg)、[mark](assets/brand/patina-mark.svg)、[icon](assets/brand/patina-icon.svg)、[social preview](assets/social/patina-og.svg)、[before/after card](assets/social/patina-before-after.svg)。利用ガイドラインは [BRANDING.md](docs/BRANDING.md) を参照してください。
|
|
26
51
|
|
|
27
52
|
## 概要
|
|
28
53
|
|
|
29
54
|
| | |
|
|
30
55
|
|---|---|
|
|
31
|
-
| **
|
|
32
|
-
| **編集ホットスポット再現率** |
|
|
33
|
-
|
|
|
56
|
+
| **168 パターン** | 各言語 33 個の書き換え可能パターン + 9 個のスコア専用 viral-hook(KO/EN/ZH/JA 各 42 個) — [PATTERNS.md](docs/PATTERNS.md) |
|
|
57
|
+
| **編集ホットスポット再現率** | 2026-05-22 modern-model rebaseline: GPT-5.5 / Claude Sonnet 4.6 / Gemini 2.5 Pro で全体の検出率 67.3% [63.5–71.0%](n=600、韓国語+英語) |
|
|
58
|
+
| **ベンチマークレポート** | 再現可能な ko/en/zh/ja suspect-zone benchmark: [overview](docs/benchmarks/README.md) · [latest.md](docs/benchmarks/latest.md) · [latest.json](docs/benchmarks/latest.json) · [2026 rebaseline](docs/benchmarks/rebaseline-latest.md) · [detector comparison](docs/benchmarks/detector-comparison.md) |
|
|
59
|
+
| **誤検出率** | 2026-05-22 KO+EN の人間文章コントロールで 16.0% [11.6–21.7%](n=200)。レジスター別の境界は [stylometry.md](core/stylometry.md) に記録 — [誤検出を報告](https://github.com/devswha/patina/issues/new?template=false_positive.yml) |
|
|
34
60
|
| **モード** | rewrite · audit · score · diff · ouroboros |
|
|
35
|
-
| **無料利用** |
|
|
36
|
-
| **決定性** |
|
|
61
|
+
| **無料利用** | ログイン済みの `codex`、`claude`、`gemini` CLI 経由で利用可能 (API キー不要) |
|
|
62
|
+
| **決定性** | スコアリング式は決定的。LLM の severity 判定段階には ±8–10pt の変動があります ([scoring.md §8](core/scoring.md)) |
|
|
37
63
|
| **ライセンス** | MIT |
|
|
38
64
|
|
|
39
65
|
## クイックスタート
|
|
@@ -44,7 +70,7 @@ patina は、韓国語・英語・中国語・日本語の文章から AI っぽ
|
|
|
44
70
|
curl -fsSL https://raw.githubusercontent.com/devswha/patina/main/install.sh | bash
|
|
45
71
|
```
|
|
46
72
|
|
|
47
|
-
インストーラは Claude Code、[Codex CLI](https://github.com/openai/codex)、Cursor、OpenCode
|
|
73
|
+
インストーラは Claude Code、[Codex CLI](https://github.com/openai/codex)、Cursor、OpenCode に patina をまとめて接続します。インストール時に remote HEAD を具体的な commit に固定します。特定のバージョンに固定したい場合は `PATINA_REF=<tag-or-full-sha>` を設定してください。続いて:
|
|
48
74
|
|
|
49
75
|
```
|
|
50
76
|
/patina --lang ja
|
|
@@ -60,7 +86,7 @@ curl -fsSL https://raw.githubusercontent.com/devswha/patina/main/install.sh | ba
|
|
|
60
86
|
[ここにエッセイの下書きを貼り付け]
|
|
61
87
|
```
|
|
62
88
|
|
|
63
|
-
|
|
89
|
+
適したトーンを自動選択:
|
|
64
90
|
|
|
65
91
|
```
|
|
66
92
|
/patina --tone auto --lang en
|
|
@@ -68,11 +94,18 @@ curl -fsSL https://raw.githubusercontent.com/devswha/patina/main/install.sh | ba
|
|
|
68
94
|
[ここにテキストを貼り付け]
|
|
69
95
|
```
|
|
70
96
|
|
|
71
|
-
> 注意:v1 では `--tone`(`auto` 含む)は ko/en のみ対応。zh/ja
|
|
97
|
+
> 注意:v1 では `--tone`(`auto` 含む)は ko/en のみ対応。zh/ja では警告を出し、profile-only モードにフォールバックします。
|
|
72
98
|
|
|
73
99
|
### スタンドアロン CLI として
|
|
74
100
|
|
|
75
|
-
Node.js ≥ 18 が必要です。
|
|
101
|
+
Node.js ≥ 18 が必要です。npm パッケージは公開済みなので、そのまま実行できます:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npx patina-cli doctor
|
|
105
|
+
npx patina-cli --lang ja input.txt
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
リポジトリを手元で編集しながら試す場合:
|
|
76
109
|
|
|
77
110
|
```bash
|
|
78
111
|
git clone https://github.com/devswha/patina.git
|
|
@@ -80,35 +113,59 @@ cd patina && npm install && npm link
|
|
|
80
113
|
patina --lang ja input.txt
|
|
81
114
|
```
|
|
82
115
|
|
|
83
|
-
link 後に stdin でも試せます:
|
|
116
|
+
`npm link` 後に stdin でも試せます:
|
|
84
117
|
|
|
85
118
|
```bash
|
|
86
119
|
printf '%s\n' 'コーヒーは、世界中の社会的交流を根本的に変えた重要な文化現象として浮上しました。' \
|
|
87
120
|
| patina --lang ja --backend codex-cli
|
|
88
121
|
```
|
|
89
122
|
|
|
90
|
-
> 🆓 **API キー不要** — [`codex`](https://github.com/openai/codex)、[`claude`](https://docs.anthropic.com/en/docs/claude-code)、[`gemini`](https://github.com/google-gemini/gemini-cli) のいずれか CLI
|
|
123
|
+
> 🆓 **API キー不要** — [`codex`](https://github.com/openai/codex)、[`claude`](https://docs.anthropic.com/en/docs/claude-code)、[`gemini`](https://github.com/google-gemini/gemini-cli)、[`kimi`](https://moonshotai.github.io/kimi-cli/) のいずれか CLI にログイン済みであれば使えます。`--backend codex-cli | claude-cli | gemini-cli | kimi-cli` で直接選ぶか、`--backend claude-cli,codex-cli` のように明示的なフォールバック順を指定できます。モデル名で自動ルーティングすることもできます(`--model claude-*` / `--model kimi-*` → 対応 CLI など)。`--model` を省略すると、backend ごとのデフォルトモデル(`gpt-5.5`、`claude-sonnet-4-6`、`gemini-2.5-pro`、`kimi-code/kimi-for-coding`)を渡します。全バックエンドは [AUTHENTICATION.md](docs/AUTHENTICATION.md) を参照してください。
|
|
91
124
|
|
|
92
|
-
### CI
|
|
125
|
+
### CI 連携
|
|
93
126
|
|
|
94
|
-
Patina には、live model key
|
|
127
|
+
Patina には、live model key なしで使える決定的な CI 文書チェックもあります:
|
|
95
128
|
|
|
96
129
|
```yaml
|
|
97
130
|
# .github/workflows/patina.yml
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
131
|
+
name: Patina prose score
|
|
132
|
+
|
|
133
|
+
on:
|
|
134
|
+
pull_request:
|
|
135
|
+
paths:
|
|
136
|
+
- '**/*.md'
|
|
137
|
+
- '**/*.mdx'
|
|
138
|
+
|
|
139
|
+
permissions:
|
|
140
|
+
contents: read
|
|
141
|
+
pull-requests: read
|
|
142
|
+
issues: write
|
|
143
|
+
|
|
144
|
+
jobs:
|
|
145
|
+
patina:
|
|
146
|
+
runs-on: ubuntu-latest
|
|
147
|
+
steps:
|
|
148
|
+
- uses: actions/checkout@v6
|
|
149
|
+
- uses: devswha/patina-action@v1
|
|
150
|
+
with:
|
|
151
|
+
score-threshold: 30
|
|
152
|
+
lang: auto
|
|
153
|
+
comment: true
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Docker イメージ公開は npm release 経路とは別に追跡しています。GHCR イメージが公開されるまでは、コンテナが必要なときにローカルイメージをビルドしてください:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
docker build -t patina:local .
|
|
160
|
+
printf '%s\n' 'コーヒーは重要な文化現象として浮上しました。' \
|
|
161
|
+
| docker run --rm -i -e PATINA_API_KEY patina:local --lang ja --provider openai
|
|
105
162
|
```
|
|
106
163
|
|
|
107
164
|
Pre-commit、Husky、Lefthook、Docker、release workflow のメモは [docs/integrations/](docs/integrations/) にあります。
|
|
108
165
|
|
|
109
|
-
##
|
|
166
|
+
## 正しい使用目的
|
|
110
167
|
|
|
111
|
-
Patina は、著者が AI
|
|
168
|
+
Patina は、著者が AI 支援で下書きを作ってよい場面で、その下書きを整えるためのツールです。どこをなぜ変えたかを確認しながら、意味を保ったまま文体を自然にします。テキストが「もともと人間によって書かれた」ことを保証するものではなく、学業上の honor code 回避、出版社 disclosure の迂回、盗用の洗浄、detector-bypass 主張に使うべきではありません。スコアは誤検出と見逃しを含む編集シグナルであり、著者判定の根拠ではありません。[ETHICS.md](docs/ETHICS.md) を参照してください。
|
|
112
169
|
|
|
113
170
|
## モード
|
|
114
171
|
|
|
@@ -121,48 +178,43 @@ patina --lang <ko|en|zh|ja> [モード] [--profile <名前>] input.txt
|
|
|
121
178
|
| *(デフォルト)* | 書き換え |
|
|
122
179
|
| `--audit` | AI パターン検出のみ |
|
|
123
180
|
| `--score` | 0–100 AI 類似度スコア + カテゴリ別内訳 |
|
|
124
|
-
| `--score --exit-on <n>` | CI を厳格に保つ: `overall > n` の場合は終了コード `3
|
|
181
|
+
| `--score --exit-on <n>` | CI を厳格に保つ: `overall > n` の場合は終了コード `3` |
|
|
125
182
|
| `--diff` | 変更箇所をパターンごとに表示 |
|
|
126
183
|
| `--ouroboros` | スコア収束まで反復(MPS ロールバック付き) |
|
|
127
184
|
| `--lang <ko\|en\|zh\|ja>` | 言語選択(デフォルト:`ko`) |
|
|
128
|
-
| `--profile <名前>` | トーンプリセット:`blog`, `academic`, `technical`, `formal`, `social`, `email`, `legal`, `medical`, `marketing`, `narrative`, `instructional`, `casual-conversation` |
|
|
185
|
+
| `--profile <名前>` | トーンプリセット:`blog`, `academic`, `technical`, `formal`, `social`, `email`, `legal`, `medical`, `marketing`, `narrative`, `instructional`, `casual-conversation`, `code-comment`, `commit-message`, `release-notes`, `namuwiki` |
|
|
129
186
|
| `--tone <名前>` | トーンカテゴリ:`casual`, `professional`, `academic`, `narrative`, `marketing`, `instructional`, `auto` |
|
|
130
187
|
| `--batch` | 位置引数をファイル一覧として処理(例:`--batch docs/*.md`) |
|
|
131
188
|
| `--format json\|text\|markdown` | JSON、プレーンテキスト、デフォルト Markdown 出力を選択 |
|
|
132
|
-
| `--
|
|
133
|
-
| `--variants <1-5>` | 同じ事実と意味アンカーを保った複数の rewrite バリアントを生成 |
|
|
134
|
-
|
|
135
|
-
全オプションは `patina --help`。
|
|
136
|
-
|
|
137
|
-
### スコア専用パターン
|
|
189
|
+
| `--quiet` | stderr の状態・警告・進捗ログを抑制 |
|
|
138
190
|
|
|
139
|
-
|
|
191
|
+
全オプションは `patina --help` を参照してください。`patina doctor --json` は LLM 呼び出しなしで Node/backend/tmux/API-key の準備状況を確認します。プロジェクト設定は任意です。単発実行ではフラグを使い、固定のデフォルトが必要な場合だけ `.patina.yaml` を追加してください。
|
|
140
192
|
|
|
141
|
-
|
|
193
|
+
Markdown 中心の開発ワークフローには、開発者向け profile もあります。`code-comment` は inline comments/docstrings を引き締め、`commit-message` は Git 履歴テキストを意図と検証が伝わる形に整えます。`release-notes` は changelog bullets をユーザー影響と移行リスクが見えるリリースノートに変えます。`namuwiki` は韓国語専用の wiki 風 profile で、NamuWiki の記事本文をコピーしない license-safe なオリジナルガイドだけを含みます。
|
|
142
194
|
|
|
143
|
-
###
|
|
144
|
-
|
|
145
|
-
`--prompt-mode strict|minimal|auto` では、完全なパターンパック(約34KBの構造化プロンプト)と圧縮されたカジュアル指示(約3KB)のどちらを使うかを調整できます。`auto` はバックエンドごとに選択します — Gemini は minimal の方が良く(長い構造化プロンプトで過度に制約されるため)、Claude は完全なパックを活用し、Codex はおおむね影響を受けません。case-05 が A/B を記録しています。
|
|
195
|
+
### スコア専用パターン
|
|
146
196
|
|
|
147
|
-
|
|
197
|
+
`--score` と `--audit` は、`--rewrite` より少し広い範囲のシグナルを測定します。viral-hook パック(`ko/en/zh/ja-viral-hook`、各9パターン: 数字ショックフック、クリックベイト末尾、出典を飛ばした権威主張、息継ぎに最適化された短文の積み重ね、誇張されたエンゲージメント語彙、偽統計引用、肩書き積み上げ、未来の自分への約束、警句的パンチライン)は**検出専用**です。
|
|
148
198
|
|
|
149
|
-
|
|
199
|
+
これらのシグナルはスコアと監査にだけ現れ、4言語の SNS マーケティングコピーに対するユーザーの直感とベンチマークを揃えるために使います。`--rewrite`/`--diff`/`--ouroboros` は、意図的な修辞であることが多いので対象外です。実例: [`examples/viral-hook/`](examples/viral-hook/)。
|
|
150
200
|
|
|
151
201
|
### 短文スコアリング補正 (v3.11)
|
|
152
202
|
|
|
153
|
-
入力が200文字以下、または3
|
|
203
|
+
入力が200文字以下、または3段落以下の場合、文体に敏感なカテゴリ(`language`、`style`、`viral-hook`)へ 1.5 倍の重みを適用し、単一段落の声色変化もスコアに反映されるようにします。case-04 では、長文向けの式がこれらを過小評価していたことが確認されました。
|
|
154
204
|
|
|
155
205
|
### セルフ監査の分離 (v3.11)
|
|
156
206
|
|
|
157
|
-
rewrite モードでは、モデルは `[BODY]`/`[/BODY]`
|
|
207
|
+
rewrite モードでは、モデルは `[BODY]`/`[/BODY]` ブロックを囲む `[SELF_AUDIT]`/`[/SELF_AUDIT]` タグの中にセルフ監査メモを出力します。patina はユーザーに表示する前に監査部分を取り除くため、出力はクリーンです。以前のバージョンでは "남아 있는 AI 티" や "Phase 3" のような前置きがユーザー向けテキストに漏れることがありました。
|
|
158
208
|
|
|
159
|
-
###
|
|
209
|
+
### 機械可読出力と終了コード
|
|
160
210
|
|
|
161
|
-
`--format json` は、すべてのモードを `overall`、`categories[]`、`tone`、`mps`、`gateResult`、クリーンな `output` 本文を含む安定した envelope で包みます。`--format markdown` がデフォルトで、`--format text` は YAML tone footer
|
|
211
|
+
`--format json` は、すべてのモードを `overall`、`categories[]`、`tone`、`mps`、`gateResult`、クリーンな `output` 本文を含む安定した JSON envelope で包みます。`--quiet` は stdout だけ欲しいスクリプトのために状態・警告・進捗ログを隠します。`--format markdown` がデフォルトで、`--format text` は YAML tone footer なしのユーザー向け本文だけを残します。終了コードは [EXIT-CODES.md](docs/EXIT-CODES.md) にまとまっています: `0` success、`1` runtime/backend、`2` input/usage、`3` score gate exceeded。
|
|
162
212
|
|
|
163
213
|
### スコア重みドリフト検出 (v3.11)
|
|
164
214
|
|
|
165
|
-
`--score` 実行時は、モデルが出力した Weight 列を設定の `category-weights` と照合します。モデルが存在しないカテゴリ(例: `discord`)を作ったり、別の数値に置き換えたりした場合、stderr に `[patina]`
|
|
215
|
+
`--score` 実行時は、モデルが出力した Weight 列を設定の `category-weights` と照合します。モデルが存在しないカテゴリ(例: `discord`)を作ったり、別の数値に置き換えたりした場合、stderr に `[patina]` 警告が出ます。これは観測用であり、weight check 自体はスコアを変更しません。`src/features/*` からの deterministic shadow score も記録され、LLM スコアと 20 点以上ずれた場合は警告し、gate には保守的な方の値を使います。
|
|
216
|
+
|
|
217
|
+
`--voice-sample <path>` または config の `voice-sample: <path>` を使うと、自分が書いた 1〜3 段落を rewrite のアンカーにできます。Profile と tone は引き続き目標 register を決め、sample はリズム、具体性、視点、文の質感だけを参照します。prompt は sample facts の取り込みを明示的に禁止します。
|
|
166
218
|
|
|
167
219
|
## トーン
|
|
168
220
|
|
|
@@ -177,17 +229,7 @@ rewrite モードでは、モデルは `[BODY]`/`[/BODY]` ブロック(`--vari
|
|
|
177
229
|
| `marketing` | 広告コピー、ランディングページ、製品告知 | 短くインパクトのある文、説得力、CTA 親和 |
|
|
178
230
|
| `instructional` | チュートリアル、ハウツー、技術ドキュメント | 命令形動詞、番号付き構造、推測表現を抑制 |
|
|
179
231
|
|
|
180
|
-
`--tone auto` はヒューリスティック(語彙 + 構造シグナル)で最適なトーンを自動選択します。zh/ja では `auto` を含む全トーン指定時に警告を出して profile-only
|
|
181
|
-
|
|
182
|
-
### MAX モード
|
|
183
|
-
|
|
184
|
-
同じテキストを Claude、Codex、Gemini に独立に通します。MPS ≥ 70 を満たす中で最もスコアが低い(最も人間らしい)結果が採用されます:
|
|
185
|
-
|
|
186
|
-
```
|
|
187
|
-
/patina-max
|
|
188
|
-
|
|
189
|
-
[ここにテキストを貼り付け]
|
|
190
|
-
```
|
|
232
|
+
`--tone auto` はヒューリスティック(語彙 + 構造シグナル)で最適なトーンを自動選択します。zh/ja では `auto` を含む全トーン指定時に警告を出して profile-only モードにフォールバックします。Phase 4.5b ヒューリスティックは ko/en のみ対応のためです。
|
|
191
233
|
|
|
192
234
|
## 仕組み
|
|
193
235
|
|
|
@@ -195,8 +237,8 @@ rewrite モードでは、モデルは `[BODY]`/`[/BODY]` ブロック(`--vari
|
|
|
195
237
|
入力
|
|
196
238
|
↓
|
|
197
239
|
[ステップ 4.5] セマンティックアンカー抽出 (主張、極性、因果、数値)
|
|
198
|
-
[ステップ 4.6] 文体統計プリパス (burstiness CV + MATTR)
|
|
199
|
-
[ステップ 4.7] AI 語彙オーバーラップ (英
|
|
240
|
+
[ステップ 4.6] 文体統計プリパス (burstiness CV + MATTR; zh/ja character-token fallback)
|
|
241
|
+
[ステップ 4.7] AI 語彙オーバーラップ (英 88 / 韓 102 / 中 60 / 日 60 項目)
|
|
200
242
|
[フェーズ 1] 構造スキャン + アンカー検証
|
|
201
243
|
[フェーズ 2] 文章リライト + アンカー検証
|
|
202
244
|
[フェーズ 3] セルフ監査 (極性、回帰、MPS)
|
|
@@ -204,45 +246,60 @@ rewrite モードでは、モデルは `[BODY]`/`[/BODY]` ブロック(`--vari
|
|
|
204
246
|
自然なテキスト(意味検証済み)
|
|
205
247
|
```
|
|
206
248
|
|
|
207
|
-
|
|
249
|
+
各検証ステップで意味のずれが見つかった場合、patina は再試行またはロールバックします。
|
|
208
250
|
|
|
209
|
-
**キャリブレーション** *(
|
|
251
|
+
**キャリブレーション** *(2026-05-22 modern-model rebaseline;方法論は [2026-rebaseline.md](docs/research/2026-rebaseline.md))*:GPT-5.5、Claude Sonnet 4.6、Gemini 2.5 Pro CLI サンプルで、決定的な編集ホットスポット catch は 67.3% [63.5–71.0%](n=600、韓国語+英語)。人間文章コントロールの誤検出は 16.0% [11.6–21.7%](n=200)。言語×モデル別の結果は [rebaseline-latest.md](docs/benchmarks/rebaseline-latest.md) に記載しています。これは編集シグナルであり、作者判定でも検出回避の約束でもありません。
|
|
210
252
|
|
|
211
253
|
## 設定
|
|
212
254
|
|
|
213
255
|
```yaml
|
|
214
256
|
# .patina.default.yaml
|
|
215
|
-
version: "
|
|
257
|
+
version: "4.0.0"
|
|
216
258
|
language: ko # ko | en | zh | ja
|
|
217
259
|
profile: default
|
|
218
260
|
output: rewrite # rewrite | diff | audit | score
|
|
219
261
|
tone: # casual | professional | academic | narrative | marketing | instructional | auto
|
|
220
|
-
max-models: [claude, gemini]
|
|
221
262
|
```
|
|
222
263
|
|
|
223
|
-
パターンパックは言語プレフィックスで自動検出されます。作業ディレクトリの `.patina.yaml` がデフォルトを上書きします。検出を拡張するリストキー(`blocklist`、`allowlist`、`skip-patterns`)は default/global/project
|
|
264
|
+
パターンパックは言語プレフィックスで自動検出されます。作業ディレクトリの `.patina.yaml` がデフォルトを上書きします。検出を拡張するリストキー(`blocklist`、`allowlist`、`skip-patterns`)は default/global/project 設定の間で追加マージされ、その他の配列キーは指定した値で置き換えられます。
|
|
224
265
|
|
|
225
266
|
## ドキュメント
|
|
226
267
|
|
|
268
|
+
- **[Cookbook](docs/COOKBOOK.md)** — 実用レシピ(Hugo バッチスコアリング、GitHub Actions、誤検出 triage、カスタム profile、pre-commit)
|
|
227
269
|
- **[Glossary](docs/GLOSSARY.md)** — MPS、fidelity、burstiness、MATTR、モードなどの反復用語の短い定義
|
|
228
270
|
- **[Demo](docs/DEMO.md)** — ターミナル transcript と複数ジャンルの before/after スナップショット
|
|
229
|
-
- **[Patterns](docs/PATTERNS.md)** —
|
|
230
|
-
- **[Authentication](docs/AUTHENTICATION.md)** — バックエンド、プロバイダ、無料ティア設定
|
|
231
|
-
- **[
|
|
232
|
-
- **[
|
|
233
|
-
- **[
|
|
234
|
-
- **[
|
|
271
|
+
- **[Patterns](docs/PATTERNS.md)** — 168 パターンカタログ
|
|
272
|
+
- **[Authentication](docs/AUTHENTICATION.md)** ([한국어](docs/AUTHENTICATION_KR.md)) — バックエンド、プロバイダ、無料ティア設定
|
|
273
|
+
- **[GitHub Action](docs/integrations/github-action.md)** — live model key なしで PR hotspot コメントと README score badge を生成
|
|
274
|
+
- **[Pre-commit](docs/integrations/pre-commit.md)** — pre-commit、Husky、Lefthook の score-only レシピ
|
|
275
|
+
- **[Static-site Stencils](docs/integrations/static-sites.md)** — Hugo、Astro、Next.js MDX のビルド時スコアリングレシピ
|
|
276
|
+
- **[Docker](docs/integrations/docker.md)** — GHCR イメージの使い方と release tag
|
|
277
|
+
- **[Release workflow](docs/integrations/release.md)** — npm provenance + GHCR 公開チェックリスト
|
|
278
|
+
- **[CLI Contract](docs/CLI.md)** — score gate、JSON/text/Markdown 出力、自動化に安全なインターフェイス
|
|
279
|
+
- **[API Reference](docs/API.md)** — プログラム的な import とスコアリング helper 向けの生成 JSDoc リファレンス
|
|
280
|
+
- **[Flag Parity](docs/FLAG-PARITY.md)** — standalone CLI と `/patina` のオプション対応範囲
|
|
281
|
+
- **[Exit Codes](docs/EXIT-CODES.md)** — CI とエディタ統合向けのプロセス終了コード契約
|
|
282
|
+
- **[Ethics](docs/ETHICS.md)** — 正しい使用目的、禁止用途、disclosure 方針
|
|
283
|
+
- **[FAQ](docs/FAQ.md)** ([한국어](docs/FAQ_KR.md)) — detector-bypass の懸念、MPS、誤検出、貢献の始め方
|
|
284
|
+
- **[False-positive Gallery](docs/FALSE-POSITIVES.md)** — 指摘ではなく編集ヒントとして扱うべき人間らしい文体の例
|
|
235
285
|
- **[Comparison](docs/COMPARISON.md)** — 一般的な paraphraser/humanizer ツールとの事実ベース比較
|
|
236
286
|
- **[Branding](docs/BRANDING.md)** — canonical logo/social assets と OG 設定メモ
|
|
237
287
|
- **[Design](DESIGN.md)** — repo-native SVG と README surface の製品/ブランド基準
|
|
238
288
|
- **[Roadmap](docs/ROADMAP.md)** — 品質、ベンチマーク、プロダクト、コミュニティ、ローンチ優先事項
|
|
289
|
+
- **[Docs Platform RFC](docs/RESEARCH-DOCS-PLATFORM.md)** — Docusaurus、Astro Starlight、MkDocs、GitHub Pages の調査
|
|
290
|
+
- **[Benchmark Reports](docs/benchmarks/README.md)** — チェックインされたベンチマーク成果物、更新コマンド、public-claim gate
|
|
239
291
|
- **[Benchmark Report](docs/benchmarks/latest.md)** — 最新の再現可能な suspect-zone ベンチマーク要約
|
|
292
|
+
- **[Detector Comparison Harness](docs/benchmarks/detector-comparison.md)** — サードパーティ detector のオフライン/手動比較プロトコル
|
|
240
293
|
- **[AI/Human Metrics Research](docs/research/ai-human-metrics.md)** — AI-like writing signals 測定用ベンチマーク設計メモ
|
|
241
|
-
- **[
|
|
294
|
+
- **[2026 Modern-model Rebaseline](docs/research/2026-rebaseline.md)** — 現在の日付スタンプ付き KO+EN catch/FP claim
|
|
295
|
+
- **[2025+ Re-baseline Plan](docs/research/2025-rebaseline-plan.md)** — より広い model-era claim 向けのプロトコル
|
|
296
|
+
- **[zh/ja Lexicon Calibration](docs/research/zh-ja-lexicon-calibration.md)** — starter lexicon gate と残りの corpus risk
|
|
297
|
+
- **[Launch Copy](docs/social/patina-launch-copy.md)** — launch sequence、score gate、Show HN/Product Hunt/Reddit/X/韓国コミュニティ向け下書き
|
|
298
|
+
- **[Signs of AI Writing](docs/social/signs-of-ai-writing.md)** ([한국어](docs/social/signs-of-ai-writing_KR.md)) — 引用例付きの共有用編集 checklist
|
|
242
299
|
- **[Stylometry](core/stylometry.md)** — burstiness + MATTR + AI 語彙アルゴリズム
|
|
243
300
|
- **[Scoring](core/scoring.md)** — AI 類似度 + 忠実度 + MPS
|
|
244
301
|
- **[Changelog](CHANGELOG.md)** — リリースノートと方法論
|
|
245
|
-
- **[Contributing](CONTRIBUTING.md)** — パターン提出、誤検出 triage、ベンチマーク fixture、バージョン管理
|
|
302
|
+
- **[Contributing](CONTRIBUTING.md)** ([한국어](CONTRIBUTING_KR.md)) — パターン提出、誤検出 triage、ベンチマーク fixture、バージョン管理
|
|
246
303
|
- **[Governance](GOVERNANCE.md)** / **[Maintainers](MAINTAINERS.md)** — 軽量なプロジェクト意思決定ルール
|
|
247
304
|
|
|
248
305
|
## 着想元
|