mcpField
A
agent-native-audit

agent-native-audit

github.com/everyincテスト・品質25.8k242 回インストール今日更新
リポジトリ

agent-native-audit について

8つのエージェントネイティブなアーキテクチャ原則に照らしてコードベースを監査するスキルです。原則ごとにサブエージェントへ並行して評価を割り当て、採点結果と優先度付きの提案をまとめます。

主な機能

  1. 018つのアーキテクチャ原則を監査
  2. 02原則別レビューを並行実行
  3. 03結果を数値で採点
  4. 04監査レポートを作成
  5. 05提案に優先順位を設定

活用シーン

  1. 01アプリのエージェント連携を評価
  2. 02エージェント機能の不足を特定
  3. 03指定した原則を個別に監査

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/everyinc/compound-engineering-plugin --skill agent-native-audit

インストール後、Claude Code で/agent-native-auditを入力して読み込まれたか確認します。

詳細

エージェントネイティブアーキテクチャ監査

エージェントネイティブアーキテクチャの原則に照らしてコードベースを包括的にレビューし、各原則を担当するサブエージェントを並行して起動して、スコア付きのレポートを作成します。

監査する主要原則

  1. アクションの同等性 - 「ユーザーにできることは、エージェントにもできる」
  2. プリミティブとしてのツール - 「ツールは動作ではなく、機能を提供する」
  3. コンテキストの注入 - 「システムプロンプトにアプリの状態に関する動的なコンテキストを含める」
  4. 共有ワークスペース - 「エージェントとユーザーが同じデータ空間で作業する」
  5. CRUD の完全性 - 「すべてのエンティティが完全な CRUD(作成、読み取り、更新、削除)を備える」
  6. UI 連携 - 「エージェントの操作が直ちに UI に反映される」
  7. 機能の発見可能性 - 「ユーザーがエージェントにできることを見つけられる」
  8. プロンプトネイティブな機能 - 「機能はコードではなく、結果を定義するプロンプトである」

ワークフロー

ステップ 1:Agent-Native Skill を読み込む

まず、agent-native-architecture スキルを呼び出し、すべての原則を把握します。

/compound-engineering:agent-native-architecture

オプション 7(アクションの同等性)を選択し、参考資料全体を読み込みます。

ステップ 2:サブエージェントを並行して起動する

Task ツールを使い、各原則を担当する subagent_type: Explore のサブエージェントを 8 つ並行して起動します。各エージェントは以下を実行します。

  1. コードベース内のすべての該当箇所(ユーザー操作、ツール、コンテキスト、データストアなど)を列挙する
  2. 原則への準拠状況を確認する
  3. 「X/Y(パーセンテージ%)」のように具体的なスコアを提示する
  4. 具体的な不足点と推奨事項を列挙する

エージェント 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 または 1
  • tools または primitives または 2
  • context または injection または 3
  • shared または workspace または 4
  • crud または 5
  • ui または integration または 6
  • discovery または 7
  • prompt または features または 8

コメント