Files
claude-code-source-code/docs/ja/02-隠し機能とコードネーム.md
2026-04-01 18:55:02 +08:00

113 lines
5.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 隠し機能とモデルコードネーム
> インターネット上で公開されている資料やコミュニティの議論をもとに整理した Claude Code v2.1.88 分析レポート。
## モデルコードネーム体系
Anthropicは内部モデルコードネームに**動物名**を使用している。外部ビルドへの漏洩を積極的に防止している。
### 既知のコードネーム
| コードネーム | 役割 | 根拠 |
|-------------|------|------|
| **Tengu**(天狗) | 製品/テレメトリ接頭辞、モデルの可能性あり | 250以上の分析イベントとfeature flagに `tengu_*` 接頭辞で使用 |
| **Capybara**(カピバラ) | Sonnet系モデル、現在v8 | `capybara-v2-fast[1m]`、v8動作問題のパッチあり |
| **Fennec**(フェネック) | Opus 4.6の前身モデル | マイグレーション: `fennec-latest``opus` |
| **Numbat**(ナンバット) | 次期モデル | コメント: "Remove this section when we launch numbat" |
### コードネーム保護
`undercover` モードで保護対象コードネームが明示されている:
```typescript
// src/utils/undercover.ts:48-49
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)
```
ビルドシステムは `scripts/excluded-strings.txt` を使用してコードネームの漏洩を検出する。Buddyシステムの種species`String.fromCharCode()` でエンコードし、カナリア検出を回避している:
```typescript
// src/buddy/types.ts:10-13
// One species name collides with a model-codename canary in excluded-strings.txt.
// The check greps build output (not source), so runtime-constructing the value keeps
// the literal out of the bundle while the check stays armed for the actual codename.
```
衝突する種は **capybara** — ペットの種でありモデルコードネームでもある。
### Capybara動作問題v8
アーキテクチャからCapybara v8の具体的な動作問題が確認される:
1. **Stop sequenceの誤発動**(プロンプト末尾に `<functions>` がある場合、約10%の発生率)
- 出典: `src/utils/messages.ts:2141`
2. **空のtool_resultで出力ゼロ**
- 出典: `src/utils/toolResultStorage.ts:281`
3. **コメント過剰挿入** — 専用コメント抑制プロンプトパッチが必要
- 出典: `src/constants/prompts.ts:204`
4. **高い虚偽主張率**: v8は29-30%、v4は16.7%
- 出典: `src/constants/prompts.ts:237`
5. **不十分な検証** — "徹底度カウンターウェイトthoroughness counterweight"が必要
- 出典: `src/constants/prompts.ts:210`
## Feature Flag命名規則
すべてのfeature flagは `tengu_` 接頭辞に**ランダムな単語ペア**を使用し、目的を難読化している:
| Flag | 用途 |
|------|------|
| `tengu_onyx_plover` | Auto Dreamバックグラウンド記憶統合 |
| `tengu_coral_fern` | memdir機能 |
| `tengu_moth_copse` | memdir追加スイッチ |
| `tengu_herring_clock` | Team memory |
| `tengu_passport_quail` | Path機能 |
| `tengu_slate_thimble` | memdir追加スイッチ |
| `tengu_sedge_lantern` | Away Summary |
| `tengu_frond_boric` | 分析キルスイッチ |
| `tengu_amber_quartz_disabled` | 音声モードキルスイッチ |
| `tengu_amber_flint` | Agent teams |
| `tengu_hive_evidence` | 検証エージェント |
ランダムな単語パターン(形容詞/素材 + 自然/物体により、外部の観察者がflag名から機能の目的を推測することを防ぐ。
## 内部ユーザーと外部ユーザーの違い
Anthropic社員`USER_TYPE === 'ant'`)は大幅に優遇されている:
### プロンプトの違い(`src/constants/prompts.ts`
| 項目 | 外部ユーザー | 内部ユーザーant |
|------|------------|-------------------|
| 出力スタイル | "Be extra concise"(極めて簡潔に) | "Err on the side of more explanation"(説明を多めに) |
| 虚偽主張対策 | なし | 専用Capybara v8パッチ適用 |
| 数値的長さ基準 | なし | "ツール間≤25単語、最終回答≤100単語" |
| 検証エージェント | なし | 非自明な変更に必須 |
| コメントガイド | 一般的 | 専用コメント過剰防止プロンプト |
| 先制的修正 | なし | "ユーザーに誤解があれば指摘する" |
### ツールアクセス
内部ユーザーのみアクセス可能なツール:
- `REPLTool` — REPLモード
- `SuggestBackgroundPRTool` — バックグラウンドPR提案
- `TungstenTool` — パフォーマンス監視パネル
- `VerifyPlanExecutionTool` — 計画実行検証
- Agent入れ子エージェントがエージェントを生成
## 隠しコマンド
| コマンド | 状態 | 説明 |
|---------|------|------|
| `/btw` | 有効 | 作業中断なしで余談質問 |
| `/stickers` | 有効 | Claude Codeステッカー注文ブラウザが開く |
| `/thinkback` | 有効 | 2025年振り返り |
| `/effort` | 有効 | モデル努力レベル設定 |
| `/good-claude` | スタブ | 隠しプレースホルダー |
| `/bughunter` | スタブ | 隠しプレースホルダー |