ce-agent-native-audit について
コードベースがエージェントネイティブな設計原則に沿っているかを評価する監査スキルです。8つの原則をサブエージェントで並行して調べ、採点結果と優先度付きの改善案をまとめます。
主な機能
- 018つの設計原則を監査
- 02サブエージェントで並行レビュー
- 03原則ごとの適合度を採点
- 04課題と改善案を提示
- 05単一原則の監査に対応
活用シーン
- 01アプリのエージェントネイティブ設計の評価
- 02UI操作とエージェントツールの差の特定
- 03コンテキスト注入と共有データの確認
- 04採点付きアーキテクチャレポートの作成
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ everyinc/ compound-engineering-plugin --skill ce-agent-native-auditインストール後、Claude Code で/ce-agent-native-auditを入力して読み込まれたか確認します。
詳細
エージェントネイティブアーキテクチャの監査
エージェントネイティブアーキテクチャの原則に照らしてコードベースを包括的にレビューし、各原則について並列サブエージェントを起動して、スコア付きレポートを作成します。
監査する主要な原則
- アクションの同等性 - 「ユーザーができることは、エージェントにもできます」
- プリミティブとしてのツール - 「ツールは機能を提供するものであり、振る舞いを提供するものではありません」
- コンテキストの注入 - 「システムプロンプトに、アプリの状態に関する動的なコンテキストを含めます」
- 共有ワークスペース - 「エージェントとユーザーが同じデータ空間で作業します」
- CRUD の完全性 - 「すべてのエンティティに完全な CRUD(作成、読み取り、更新、削除)を備えます」
- UI 連携 - 「エージェントのアクションが即座に UI に反映されます」
- 機能の発見可能性 - 「ユーザーがエージェントにできることを把握できます」
- プロンプトネイティブな機能 - 「機能はコードではなく、成果を定義するプロンプトです」
ワークフロー
ステップ 1:Agent-Native Skill を読み込む
まず、agent-native-architecture スキルを呼び出して、すべての原則を理解します。
/ce-agent-native-architecture
オプション 7(アクションの同等性)を選択して、リファレンス資料全体を読み込みます。
ステップ 2:並列サブエージェントを起動する
プラットフォームのサブエージェントプリミティブ(Claude Code では Agent と subagent_type: Explore、Codex では spawn_agent と agent_type: "explorer"、Pi では pi-subagents 拡張機能経由で subagent と agent: "scout")を使って、各原則につき 1 つ、計 8 つのサブエージェントを並列に起動します。各エージェントは次の作業を行います。
- コードベース内の該当するすべての要素(ユーザーアクション、ツール、コンテキスト、データストアなど)を列挙する
- その原則への準拠状況を確認する
- 「X/Y(割合%)」のように具体的なスコアを提示する
- 具体的な不足点と推奨事項を列挙する
エージェント 1:アクションの同等性
Audit for ACTION PARITY - "Whatever the user can do, the agent can do."
Tasks:
1. Enumerate ALL user actions in frontend (API calls, button clicks, form submissions)
- Search for API service files, fetch calls, form handlers
- Check routes and components for user interactions
2. Check which have corresponding agent tools
- Search for agent tool definitions
- Map user actions to agent capabilities
3. Score: "Agent can do X out of Y user actions"
Format:
## Action Parity Audit
### User Actions Found
| Action | Location | Agent Tool | Status |
### Score: X/Y (percentage%)
### Missing Agent Tools
### Recommendations
エージェント 2:プリミティブとしてのツール
Audit for TOOLS AS PRIMITIVES - "Tools provide capability, not behavior."
Tasks:
1. Find and read ALL agent tool files
2. Classify each as:
- PRIMITIVE (good): read, write, store, list - enables capability without business logic
- WORKFLOW (bad): encodes business logic, makes decisions, orchestrates steps
3. Score: "X out of Y tools are proper primitives"
Format:
## Tools as Primitives Audit
### Tool Analysis
| Tool | File | Type | Reasoning |
### Score: X/Y (percentage%)
### Problematic Tools (workflows that should be primitives)
### Recommendations
エージェント 3:コンテキストの注入
Audit for CONTEXT INJECTION - "System prompt includes dynamic context about app state"
Tasks:
1. Find context injection code (search for "context", "system prompt", "inject")
2. Read agent prompts and system messages
3. Enumerate what IS injected vs what SHOULD be:
- Available resources (files, drafts, documents)
- User preferences/settings
- Recent activity
- Available capabilities listed
- Session history
- Workspace state
Format:
## Context Injection Audit
### Context Types Analysis
| Context Type | Injected? | Location | Notes |
### Score: X/Y (percentage%)
### Missing Context
### Recommendations
エージェント 4:共有ワークスペース
Audit for SHARED WORKSPACE - "Agent and user work in the same data space"
Tasks:
1. Identify all data stores/tables/models
2. Check if agents read/write to SAME tables or separate ones
3. Look for sandbox isolation anti-pattern (agent has separate data space)
Format:
## Shared Workspace Audit
### Data Store Analysis
| Data Store | User Access | Agent Access | Shared? |
### Score: X/Y (percentage%)
### Isolated Data (anti-pattern)
### Recommendations
エージェント 5:CRUD の完全性
Audit for CRUD COMPLETENESS - "Every entity has full CRUD"
Tasks:
1. Identify all entities/models in the codebase
2. For each entity, check if agent tools exist for:
- Create
- Read
- Update
- Delete
3. Score per entity and overall
Format:
## CRUD Completeness Audit
### Entity CRUD Analysis
| Entity | Create | Read | Update | Delete | Score |
### Overall Score: X/Y entities with full CRUD (percentage%)
### Incomplete Entities (list missing operations)
### Recommendations
エージェント 6:UI 連携
Audit for UI INTEGRATION - "Agent actions immediately reflected in UI"
Tasks:
1. Check how agent writes/changes propagate to frontend
2. Look for:
- Streaming updates (SSE, WebSocket)
- Polling mechanisms
- Shared state/services
- Event buses
- File watching
3. Identify "silent actions" anti-pattern (agent changes state but UI doesn't update)
Format:
## UI Integration Audit
### Agent Action → UI Update Analysis
| Agent Action | UI Mechanism | Immediate? | Notes |
### Score: X/Y (percentage%)
### Silent Actions (anti-pattern)
### Recommendations
エージェント 7:機能の発見可能性
Audit for CAPABILITY DISCOVERY - "Users can discover what the agent can do"
Tasks:
1. Check for these 7 discovery mechanisms:
- Onboarding flow showing agent capabilities
- Help documentation
- Capability hints in UI
- Agent self-describes in responses
- Suggested prompts/actions
- Empty state guidance
- Slash commands (/help, /tools)
2. Score against 7 mechanisms
Format:
## Capability Discovery Audit
### Discovery Mechanism Analysis
| Mechanism | Exists? | Location | Quality |
### Score: X/7 (percentage%)
### Missing Discovery
### Recommendations
エージェント 8:プロンプトネイティブな機能
Audit for PROMPT-NATIVE FEATURES - "Features are prompts defining outcomes, not code"
Tasks:
1. Read all agent prompts
2. Classify each feature/behavior as defined in:
- PROMPT (good): outcomes defined in natural language
- CODE (bad): business logic hardcoded
3. Check if behavior changes require prompt edit vs code change
Format:
## Prompt-Native Features Audit
### Feature Definition Analysis
| Feature | Defined In | Type | Notes |
### Score: X/Y (percentage%)
### Code-Defined Features (anti-pattern)
### Recommendations
ステップ 3:サマリーレポートを作成する
すべてのエージェントが完了したら、次の内容を含むサマリーを作成します。
## Agent-Native Architecture Review: [Project Name]
### Overall Score Summary
| Core Principle | Score | Percentage | Status |
|----------------|-------|------------|--------|
| Action Parity | X/Y | Z% | ✅/⚠️/❌ |
| Tools as Primitives | X/Y | Z% | ✅/⚠️/❌ |
| Context Injection | X/Y | Z% | ✅/⚠️/❌ |
| Shared Workspace | X/Y | Z% | ✅/⚠️/❌ |
| CRUD Completeness | X/Y | Z% | ✅/⚠️/❌ |
| UI Integration | X/Y | Z% | ✅/⚠️/❌ |
| Capability Discovery | X/Y | Z% | ✅/⚠️/❌ |
| Prompt-Native Features | X/Y | Z% | ✅/⚠️/❌ |
**Overall Agent-Native Score: X%**
### Status Legend
- ✅ Excellent (80%+)
- ⚠️ Partial (50-79%)
- ❌ Needs Work (<50%)
### Top 10 Recommendations by Impact
| Priority | Action | Principle | Effort |
|----------|--------|-----------|--------|
### What's Working Excellently
[List top 5 strengths]
成功基準
- 8 つすべてのサブエージェントが監査を完了している
- 各原則に具体的な数値スコア(X/Y 形式)が付いている
- サマリーテーブルにすべてのスコアとステータス指標が示されている
- 影響度に基づいて優先順位を付けた上位 10 件の推奨事項がある
- レポートで強みと不足点の両方が特定されている
任意:単一原則の監査
$ARGUMENTS で単一の原則が指定されている場合(例:「action parity」)、そのサブエージェントのみを実行し、その原則に関する詳細な調査結果だけを提示します。
有効な引数:
action parityまたは1toolsまたはprimitivesまたは2contextまたはinjectionまたは3sharedまたはworkspaceまたは4crudまたは5uiまたはintegrationまたは6discoveryまたは7promptまたはfeaturesまたは8