Add Japanese and Korean README, docs translations, and language links
This commit is contained in:
110
docs/ja/03-アンダーカバーモード.md
Normal file
110
docs/ja/03-アンダーカバーモード.md
Normal file
@@ -0,0 +1,110 @@
|
||||
# アンダーカバーモード分析
|
||||
|
||||
> Claude Code v2.1.88 デコンパイルソースコード分析に基づく。
|
||||
|
||||
## アンダーカバーモードとは
|
||||
|
||||
アンダーカバーモードは、Anthropic社員が公開/オープンソースリポジトリにコントリビュートする際の安全システムである。有効化するとすべてのAI帰属表示を除去し、人間の開発者が書いたかのようにコントリビュートするようモデルに指示する。
|
||||
|
||||
出典: `src/utils/undercover.ts`
|
||||
|
||||
## 有効化条件
|
||||
|
||||
```typescript
|
||||
// src/utils/undercover.ts:28-37
|
||||
export function isUndercover(): boolean {
|
||||
if (process.env.USER_TYPE === 'ant') {
|
||||
if (isEnvTruthy(process.env.CLAUDE_CODE_UNDERCOVER)) return true
|
||||
// Auto: 内部リポジトリと確認されない限り自動有効化
|
||||
return getRepoClassCached() !== 'internal'
|
||||
}
|
||||
return false
|
||||
}
|
||||
```
|
||||
|
||||
主な特性:
|
||||
- **内部専用**: Anthropic社員(`USER_TYPE === 'ant'`)のみ対象
|
||||
- **デフォルト有効**: 内部許可リストにないすべてのリポジトリで自動有効化
|
||||
- **強制無効化不可**: "There is NO force-OFF. This guards against model codename leaks"
|
||||
- **外部ビルド**: バンドラーによりデッドコード除去され、実行されない
|
||||
|
||||
## モデルに渡されるプロンプト
|
||||
|
||||
```typescript
|
||||
// src/utils/undercover.ts:39-69
|
||||
export function getUndercoverInstructions(): string {
|
||||
return `## UNDERCOVER MODE — CRITICAL
|
||||
|
||||
You are operating UNDERCOVER in a PUBLIC/OPEN-SOURCE repository. Your commit
|
||||
messages, PR titles, and PR bodies MUST NOT contain ANY Anthropic-internal
|
||||
information. Do not blow your cover.
|
||||
|
||||
NEVER include in commit messages or PR descriptions:
|
||||
- Internal model codenames (animal names like Capybara, Tengu, etc.)
|
||||
- Unreleased model version numbers (e.g., opus-4-7, sonnet-4-8)
|
||||
- Internal repo or project names (e.g., claude-cli-internal, anthropics/…)
|
||||
- Internal tooling, Slack channels, or short links (e.g., go/cc, #claude-code-…)
|
||||
- The phrase "Claude Code" or any mention that you are an AI
|
||||
- Any hint of what model or version you are
|
||||
- Co-Authored-By lines or any other attribution
|
||||
|
||||
Write commit messages as a human developer would — describe only what the code
|
||||
change does.
|
||||
|
||||
GOOD:
|
||||
- "Fix race condition in file watcher initialization"
|
||||
- "Add support for custom key bindings"
|
||||
|
||||
BAD (never write these):
|
||||
- "Fix bug found while testing with Claude Capybara"
|
||||
- "1-shotted by claude-opus-4-6"
|
||||
- "Generated with Claude Code"
|
||||
- "Co-Authored-By: Claude Opus 4.6 <…>"`
|
||||
}
|
||||
```
|
||||
|
||||
## 帰属表示システム
|
||||
|
||||
帰属表示システム(`src/utils/attribution.ts`、`src/utils/commitAttribution.ts`)はアンダーカバーモードを補完する:
|
||||
|
||||
```typescript
|
||||
// src/utils/attribution.ts:70-72
|
||||
// @[MODEL LAUNCH]: 以下のハードコードされたフォールバックモデル名を更新
|
||||
// (コードネーム漏洩防止用)。
|
||||
// 外部リポジトリでは、認識されないモデルは "Claude Opus 4.6" にフォールバック。
|
||||
```
|
||||
|
||||
```typescript
|
||||
// src/utils/model/model.ts:386-392
|
||||
function maskModelCodename(baseName: string): string {
|
||||
// e.g. capybara-v2-fast → cap*****-v2-fast
|
||||
const [codename = '', ...rest] = baseName.split('-')
|
||||
const masked = codename.slice(0, 3) + '*'.repeat(Math.max(0, codename.length - 3))
|
||||
return [masked, ...rest].join('-')
|
||||
}
|
||||
```
|
||||
|
||||
## 示唆
|
||||
|
||||
### オープンソースへの影響
|
||||
|
||||
Anthropic社員がClaude Codeでオープンソースプロジェクトにコントリビュートする場合:
|
||||
1. AIがコードを書くが、コミットは人間が書いたものとして表示される
|
||||
2. "Co-Authored-By: Claude"の帰属表示がない
|
||||
3. "Generated with Claude Code"のマーカーがない
|
||||
4. プロジェクトメンテナーやコミュニティはAI生成のコントリビュートを識別できない
|
||||
5. AIコントリビュートに関するオープンソースの透明性規範に抵触する可能性がある
|
||||
|
||||
### Anthropicの保護目的
|
||||
|
||||
主な目的は以下の偶発的漏洩の防止:
|
||||
- 内部モデルコードネーム(競争情報)
|
||||
- 未公開バージョン番号(市場タイミング)
|
||||
- 内部インフラの詳細(セキュリティ)
|
||||
|
||||
### 倫理的考察
|
||||
|
||||
"Do not blow your cover(正体を明かすな)"という表現はAIを潜入工作員として位置づけている。公開コードコントリビュートにおけるAI著作の意図的な隠匿は以下の問題を提起する:
|
||||
- オープンソースコミュニティにおける透明性
|
||||
- プロジェクトコントリビュートガイドラインの遵守
|
||||
- 営業秘密保護と欺瞞の境界線
|
||||
Reference in New Issue
Block a user