agent-native-audit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAgent-Native Architecture Audit
Agent-Native架构审计
Conduct a comprehensive review of the codebase against agent-native architecture principles, launching parallel sub-agents for each principle and producing a scored report.
针对Agent原生架构准则对代码库开展全面评审,为每个准则启动并行子Agent,并生成带评分的报告。
Core Principles to Audit
待审计的核心准则
- Action Parity - "Whatever the user can do, the agent can do"
- Tools as Primitives - "Tools provide capability, not behavior"
- Context Injection - "System prompt includes dynamic context about app state"
- Shared Workspace - "Agent and user work in the same data space"
- CRUD Completeness - "Every entity has full CRUD (Create, Read, Update, Delete)"
- UI Integration - "Agent actions immediately reflected in UI"
- Capability Discovery - "Users can discover what the agent can do"
- Prompt-Native Features - "Features are prompts defining outcomes, not code"
- Action Parity - "用户可执行的操作,Agent也可执行"
- Tools as Primitives - "工具提供能力,而非行为"
- Context Injection - "系统提示词包含应用状态的动态上下文"
- Shared Workspace - "Agent与用户在同一数据空间内工作"
- CRUD Completeness - "每个实体都具备完整的CRUD(创建、读取、更新、删除)能力"
- UI Integration - "Agent的操作可立即在UI中体现"
- Capability Discovery - "用户可发现Agent的能力范围"
- Prompt-Native Features - "功能由定义结果的提示词实现,而非代码"
Workflow
工作流程
Step 1: Load the Agent-Native Skill
步骤1:加载Agent原生技能
First, invoke the agent-native-architecture skill to understand all principles:
/compound-engineering:agent-native-architectureSelect option 7 (action parity) to load the full reference material.
首先,调用agent-native-architecture技能以了解所有准则:
/compound-engineering:agent-native-architecture选择选项7(action parity)以加载完整参考资料。
Step 2: Launch Parallel Sub-Agents
步骤2:启动并行子Agent
Launch 8 parallel sub-agents using the Task tool with , one for each principle. Each agent should:
subagent_type: Explore- Enumerate ALL instances in the codebase (user actions, tools, contexts, data stores, etc.)
- Check compliance against the principle
- Provide a SPECIFIC SCORE like "X out of Y (percentage%)"
- List specific gaps and recommendations
Agent 1: Action Parity
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:使用Task工具启动8个并行子Agent,设为Explore,每个准则对应一个子Agent。每个子Agent需完成以下任务:
subagent_type- 枚举代码库中的所有实例(用户操作、工具、上下文、数据存储等)
- 检查是否符合对应准则
- 给出具体评分,格式为"X/Y(百分比%)"
- 列出具体差距与改进建议
Agent 1: Action Parity
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
Action Parity Audit
User Actions Found
User Actions Found
| Action | Location | Agent Tool | Status |
| Action | Location | Agent Tool | Status |
Score: X/Y (percentage%)
Score: X/Y (percentage%)
Missing Agent Tools
Missing Agent Tools
Recommendations
Recommendations
**Agent 2: Tools as Primitives**Audit for TOOLS AS PRIMITIVES - "Tools provide capability, not behavior."
Tasks:
- Find and read ALL agent tool files
- Classify each as:
- PRIMITIVE (good): read, write, store, list - enables capability without business logic
- WORKFLOW (bad): encodes business logic, makes decisions, orchestrates steps
- Score: "X out of Y tools are proper primitives"
Format:
**Agent 2: Tools as Primitives**Audit for TOOLS AS PRIMITIVES - "Tools provide capability, not behavior."
Tasks:
- Find and read ALL agent tool files
- Classify each as:
- PRIMITIVE (good): read, write, store, list - enables capability without business logic
- WORKFLOW (bad): encodes business logic, makes decisions, orchestrates steps
- Score: "X out of Y tools are proper primitives"
Format:
Tools as Primitives Audit
Tools as Primitives Audit
Tool Analysis
Tool Analysis
| Tool | File | Type | Reasoning |
| Tool | File | Type | Reasoning |
Score: X/Y (percentage%)
Score: X/Y (percentage%)
Problematic Tools (workflows that should be primitives)
Problematic Tools (workflows that should be primitives)
Recommendations
Recommendations
**Agent 3: Context Injection**Audit for CONTEXT INJECTION - "System prompt includes dynamic context about app state"
Tasks:
- Find context injection code (search for "context", "system prompt", "inject")
- Read agent prompts and system messages
- 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:
**Agent 3: Context Injection**Audit for CONTEXT INJECTION - "System prompt includes dynamic context about app state"
Tasks:
- Find context injection code (search for "context", "system prompt", "inject")
- Read agent prompts and system messages
- 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 Injection Audit
Context Types Analysis
Context Types Analysis
| Context Type | Injected? | Location | Notes |
| Context Type | Injected? | Location | Notes |
Score: X/Y (percentage%)
Score: X/Y (percentage%)
Missing Context
Missing Context
Recommendations
Recommendations
**Agent 4: Shared Workspace**Audit for SHARED WORKSPACE - "Agent and user work in the same data space"
Tasks:
- Identify all data stores/tables/models
- Check if agents read/write to SAME tables or separate ones
- Look for sandbox isolation anti-pattern (agent has separate data space)
Format:
**Agent 4: Shared Workspace**Audit for SHARED WORKSPACE - "Agent and user work in the same data space"
Tasks:
- Identify all data stores/tables/models
- Check if agents read/write to SAME tables or separate ones
- Look for sandbox isolation anti-pattern (agent has separate data space)
Format:
Shared Workspace Audit
Shared Workspace Audit
Data Store Analysis
Data Store Analysis
| Data Store | User Access | Agent Access | Shared? |
| Data Store | User Access | Agent Access | Shared? |
Score: X/Y (percentage%)
Score: X/Y (percentage%)
Isolated Data (anti-pattern)
Isolated Data (anti-pattern)
Recommendations
Recommendations
**Agent 5: CRUD Completeness**Audit for CRUD COMPLETENESS - "Every entity has full CRUD"
Tasks:
- Identify all entities/models in the codebase
- For each entity, check if agent tools exist for:
- Create
- Read
- Update
- Delete
- Score per entity and overall
Format:
**Agent 5: CRUD Completeness**Audit for CRUD COMPLETENESS - "Every entity has full CRUD"
Tasks:
- Identify all entities/models in the codebase
- For each entity, check if agent tools exist for:
- Create
- Read
- Update
- Delete
- Score per entity and overall
Format:
CRUD Completeness Audit
CRUD Completeness Audit
Entity CRUD Analysis
Entity CRUD Analysis
| Entity | Create | Read | Update | Delete | Score |
| Entity | Create | Read | Update | Delete | Score |
Overall Score: X/Y entities with full CRUD (percentage%)
Overall Score: X/Y entities with full CRUD (percentage%)
Incomplete Entities (list missing operations)
Incomplete Entities (list missing operations)
Recommendations
Recommendations
**Agent 6: UI Integration**Audit for UI INTEGRATION - "Agent actions immediately reflected in UI"
Tasks:
- Check how agent writes/changes propagate to frontend
- Look for:
- Streaming updates (SSE, WebSocket)
- Polling mechanisms
- Shared state/services
- Event buses
- File watching
- Identify "silent actions" anti-pattern (agent changes state but UI doesn't update)
Format:
**Agent 6: UI Integration**Audit for UI INTEGRATION - "Agent actions immediately reflected in UI"
Tasks:
- Check how agent writes/changes propagate to frontend
- Look for:
- Streaming updates (SSE, WebSocket)
- Polling mechanisms
- Shared state/services
- Event buses
- File watching
- Identify "silent actions" anti-pattern (agent changes state but UI doesn't update)
Format:
UI Integration Audit
UI Integration Audit
Agent Action → UI Update Analysis
Agent Action → UI Update Analysis
| Agent Action | UI Mechanism | Immediate? | Notes |
| Agent Action | UI Mechanism | Immediate? | Notes |
Score: X/Y (percentage%)
Score: X/Y (percentage%)
Silent Actions (anti-pattern)
Silent Actions (anti-pattern)
Recommendations
Recommendations
**Agent 7: Capability Discovery**Audit for CAPABILITY DISCOVERY - "Users can discover what the agent can do"
Tasks:
- 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)
- Score against 7 mechanisms
Format:
**Agent 7: Capability Discovery**Audit for CAPABILITY DISCOVERY - "Users can discover what the agent can do"
Tasks:
- 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)
- Score against 7 mechanisms
Format:
Capability Discovery Audit
Capability Discovery Audit
Discovery Mechanism Analysis
Discovery Mechanism Analysis
| Mechanism | Exists? | Location | Quality |
| Mechanism | Exists? | Location | Quality |
Score: X/7 (percentage%)
Score: X/7 (percentage%)
Missing Discovery
Missing Discovery
Recommendations
Recommendations
**Agent 8: Prompt-Native Features**Audit for PROMPT-NATIVE FEATURES - "Features are prompts defining outcomes, not code"
Tasks:
- Read all agent prompts
- Classify each feature/behavior as defined in:
- PROMPT (good): outcomes defined in natural language
- CODE (bad): business logic hardcoded
- Check if behavior changes require prompt edit vs code change
Format:
**Agent 8: Prompt-Native Features**Audit for PROMPT-NATIVE FEATURES - "Features are prompts defining outcomes, not code"
Tasks:
- Read all agent prompts
- Classify each feature/behavior as defined in:
- PROMPT (good): outcomes defined in natural language
- CODE (bad): business logic hardcoded
- Check if behavior changes require prompt edit vs code change
Format:
Prompt-Native Features Audit
Prompt-Native Features Audit
Feature Definition Analysis
Feature Definition Analysis
| Feature | Defined In | Type | Notes |
| Feature | Defined In | Type | Notes |
Score: X/Y (percentage%)
Score: X/Y (percentage%)
Code-Defined Features (anti-pattern)
Code-Defined Features (anti-pattern)
Recommendations
Recommendations
</sub-agents>
</sub-agents>Step 3: Compile Summary Report
步骤3:编译汇总报告
After all agents complete, compile a summary with:
markdown
undefined所有Agent完成审计后,编译包含以下内容的汇总报告:
markdown
undefinedAgent-Native Architecture Review: [Project Name]
Agent-Native架构评审:[项目名称]
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%
| 核心准则 | 评分 | 百分比 | 状态 |
|---|---|---|---|
| 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% | ✅/⚠️/❌ |
整体Agent原生架构评分:X%
Status Legend
状态说明
- ✅ Excellent (80%+)
- ⚠️ Partial (50-79%)
- ❌ Needs Work (<50%)
- ✅ 优秀(80%+)
- ⚠️ 一般(50-79%)
- ❌ 待改进(<50%)
Top 10 Recommendations by Impact
按影响优先级排序的Top 10改进建议
| Priority | Action | Principle | Effort |
|---|
| 优先级 | 操作 | 准则 | 实施难度 |
|---|
What's Working Excellently
表现优异的方面
[List top 5 strengths]
undefined[列出Top 5优势]
undefinedSuccess Criteria
成功标准
- All 8 sub-agents complete their audits
- Each principle has a specific numeric score (X/Y format)
- Summary table shows all scores and status indicators
- Top 10 recommendations are prioritized by impact
- Report identifies both strengths and gaps
- 所有8个子Agent完成审计
- 每个准则都有具体的数字评分(X/Y格式)
- 汇总表格展示所有评分和状态标识
- Top 10改进建议按影响优先级排序
- 报告同时指出优势与差距
Optional: Single Principle Audit
可选:单一准则审计
If $ARGUMENTS specifies a single principle (e.g., "action parity"), only run that sub-agent and provide detailed findings for that principle alone.
Valid arguments:
- or
action parity1 - or
toolsorprimitives2 - or
contextorinjection3 - or
sharedorworkspace4 - or
crud5 - or
uiorintegration6 - or
discovery7 - or
promptorfeatures8
若$ARGUMENTS指定单一准则(例如"action parity"),仅运行对应子Agent并提供该准则的详细审计结果。
有效参数:
- 或
action parity1 - 或
tools或primitives2 - 或
context或injection3 - 或
shared或workspace4 - 或
crud5 - 或
ui或integration6 - 或
discovery7 - 或
prompt或features8