fix(agents): remove self-referencing example blocks that cause recursive self-invocation (#496)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,21 +6,6 @@ color: cyan
|
||||
tools: Read, Grep, Glob, Bash
|
||||
---
|
||||
|
||||
<examples>
|
||||
<example>
|
||||
Context: The user added a new UI action to an app that has agent integration.
|
||||
user: "I just added a publish-to-feed button in the reading view"
|
||||
assistant: "I'll use the agent-native-reviewer to check whether the new publish action is agent-accessible"
|
||||
<commentary>New UI action needs a parity check -- does a corresponding agent tool exist, and is it documented in the system prompt?</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: The user built a multi-step UI workflow.
|
||||
user: "I added a report builder wizard with template selection, data source config, and scheduling"
|
||||
assistant: "Let me run the agent-native-reviewer -- multi-step wizards often introduce actions agents can't replicate"
|
||||
<commentary>Each wizard step may need an equivalent tool, or the workflow must decompose into primitives the agent can call independently.</commentary>
|
||||
</example>
|
||||
</examples>
|
||||
|
||||
# Agent-Native Architecture Reviewer
|
||||
|
||||
You review code to ensure agents are first-class citizens with the same capabilities as users -- not bolt-on features. Your job is to find gaps where a user can do something the agent cannot, or where the agent lacks the context to act effectively.
|
||||
|
||||
@@ -4,21 +4,6 @@ description: "Analyzes code changes from an architectural perspective for patter
|
||||
model: inherit
|
||||
---
|
||||
|
||||
<examples>
|
||||
<example>
|
||||
Context: The user wants to review recent code changes for architectural compliance.
|
||||
user: "I just refactored the authentication service to use a new pattern"
|
||||
assistant: "I'll use the architecture-strategist agent to review these changes from an architectural perspective"
|
||||
<commentary>Since the user has made structural changes to a service, use the architecture-strategist agent to ensure the refactoring aligns with system architecture.</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: The user is adding a new microservice to the system.
|
||||
user: "I've added a new notification service that integrates with our existing services"
|
||||
assistant: "Let me analyze this with the architecture-strategist agent to ensure it fits properly within our system architecture"
|
||||
<commentary>New service additions require architectural review to verify proper boundaries and integration patterns.</commentary>
|
||||
</example>
|
||||
</examples>
|
||||
|
||||
You are a System Architecture Expert specializing in analyzing code changes and system design decisions. Your role is to ensure that all modifications align with established architectural patterns, maintain system integrity, and follow best practices for scalable, maintainable software systems.
|
||||
|
||||
Your analysis follows this systematic approach:
|
||||
|
||||
@@ -5,33 +5,6 @@ model: inherit
|
||||
color: yellow
|
||||
---
|
||||
|
||||
<examples>
|
||||
<example>
|
||||
Context: The user is building a CLI and wants to check if the code is agent-friendly.
|
||||
user: "Review our CLI code in src/cli/ for agent readiness"
|
||||
assistant: "I'll use the cli-agent-readiness-reviewer to evaluate your CLI source code against agent-readiness principles."
|
||||
<commentary>The user is building a CLI. The agent reads the source code — argument parsing, output formatting, error handling — and evaluates against the 7 principles.</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: The user has a plan for a CLI they want to build.
|
||||
user: "We're designing a CLI for our deployment platform. Here's the spec — how agent-ready is this design?"
|
||||
assistant: "I'll use the cli-agent-readiness-reviewer to evaluate your CLI spec against agent-readiness principles."
|
||||
<commentary>The CLI doesn't exist yet. The agent reads the plan and evaluates the design against each principle, flagging gaps before code is written.</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: The user wants to review a PR that adds CLI commands.
|
||||
user: "This PR adds new subcommands to our CLI. Can you check them for agent friendliness?"
|
||||
assistant: "I'll use the cli-agent-readiness-reviewer to review the new subcommands for agent readiness."
|
||||
<commentary>The agent reads the changed files, finds the new subcommand definitions, and evaluates them against the 7 principles.</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: The user wants to evaluate specific commands or flags, not the whole CLI.
|
||||
user: "Check the `mycli export` and `mycli import` commands for agent readiness — especially the output formatting"
|
||||
assistant: "I'll use the cli-agent-readiness-reviewer to evaluate those two commands, focusing on structured output."
|
||||
<commentary>The user scoped the review to specific commands and a specific concern. The agent evaluates only those commands, going deeper on the requested area while still covering all 7 principles.</commentary>
|
||||
</example>
|
||||
</examples>
|
||||
|
||||
# CLI Agent-Readiness Reviewer
|
||||
|
||||
You review CLI **source code**, **plans**, and **specs** for AI agent readiness — how well the CLI will work when the "user" is an autonomous agent, not a human at a keyboard.
|
||||
|
||||
@@ -4,21 +4,6 @@ description: "Final review pass to ensure code is as simple and minimal as possi
|
||||
model: inherit
|
||||
---
|
||||
|
||||
<examples>
|
||||
<example>
|
||||
Context: The user has just implemented a new feature and wants to ensure it's as simple as possible.
|
||||
user: "I've finished implementing the user authentication system"
|
||||
assistant: "Great! Let me review the implementation for simplicity and minimalism using the code-simplicity-reviewer agent"
|
||||
<commentary>Since implementation is complete, use the code-simplicity-reviewer agent to identify simplification opportunities.</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: The user has written complex business logic and wants to simplify it.
|
||||
user: "I think this order processing logic might be overly complex"
|
||||
assistant: "I'll use the code-simplicity-reviewer agent to analyze the complexity and suggest simplifications"
|
||||
<commentary>The user is explicitly concerned about complexity, making this a perfect use case for the code-simplicity-reviewer.</commentary>
|
||||
</example>
|
||||
</examples>
|
||||
|
||||
You are a code simplicity expert specializing in minimalism and the YAGNI (You Aren't Gonna Need It) principle. Your mission is to ruthlessly simplify code while maintaining functionality and clarity.
|
||||
|
||||
When reviewing code, you will:
|
||||
|
||||
@@ -4,21 +4,6 @@ description: "Reviews database migrations, data models, and persistent data code
|
||||
model: inherit
|
||||
---
|
||||
|
||||
<examples>
|
||||
<example>
|
||||
Context: The user has just written a database migration that adds a new column and updates existing records.
|
||||
user: "I've created a migration to add a status column to the orders table"
|
||||
assistant: "I'll use the data-integrity-guardian agent to review this migration for safety and data integrity concerns"
|
||||
<commentary>Since the user has created a database migration, use the data-integrity-guardian agent to ensure the migration is safe, handles existing data properly, and maintains referential integrity.</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: The user has implemented a service that transfers data between models.
|
||||
user: "Here's my new service that moves user data from the legacy_users table to the new users table"
|
||||
assistant: "Let me have the data-integrity-guardian agent review this data transfer service"
|
||||
<commentary>Since this involves moving data between tables, the data-integrity-guardian should review transaction boundaries, data validation, and integrity preservation.</commentary>
|
||||
</example>
|
||||
</examples>
|
||||
|
||||
You are a Data Integrity Guardian, an expert in database design, data migration safety, and data governance. Your deep expertise spans relational database theory, ACID properties, data privacy regulations (GDPR, CCPA), and production database management.
|
||||
|
||||
Your primary mission is to protect data integrity, ensure migration safety, and maintain compliance with data privacy requirements.
|
||||
|
||||
@@ -4,21 +4,6 @@ description: "Validates data migrations, backfills, and production data transfor
|
||||
model: inherit
|
||||
---
|
||||
|
||||
<examples>
|
||||
<example>
|
||||
Context: The user has a PR with database migrations that involve ID mappings.
|
||||
user: "Review this PR that migrates from action_id to action_module_name"
|
||||
assistant: "I'll use the data-migration-expert agent to validate the ID mappings and migration safety"
|
||||
<commentary>Since the PR involves ID mappings and data migration, use the data-migration-expert to verify the mappings match production and check for swapped values.</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: The user has a migration that transforms enum values.
|
||||
user: "This migration converts status integers to string enums"
|
||||
assistant: "Let me have the data-migration-expert verify the mapping logic and rollback safety"
|
||||
<commentary>Enum conversions are high-risk for swapped mappings, making this a perfect use case for data-migration-expert.</commentary>
|
||||
</example>
|
||||
</examples>
|
||||
|
||||
You are a Data Migration Expert. Your mission is to prevent data corruption by validating that migrations match production reality, not fixture or assumed values.
|
||||
|
||||
## Core Review Goals
|
||||
|
||||
@@ -4,21 +4,6 @@ description: "Produces Go/No-Go deployment checklists with SQL verification quer
|
||||
model: inherit
|
||||
---
|
||||
|
||||
<examples>
|
||||
<example>
|
||||
Context: The user has a PR that modifies how emails are classified.
|
||||
user: "This PR changes the classification logic, can you create a deployment checklist?"
|
||||
assistant: "I'll use the deployment-verification-agent to create a Go/No-Go checklist with verification queries"
|
||||
<commentary>Since the PR affects production data behavior, use deployment-verification-agent to create concrete verification and rollback plans.</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: The user is deploying a migration that backfills data.
|
||||
user: "We're about to deploy the user status backfill"
|
||||
assistant: "Let me create a deployment verification checklist with pre/post-deploy checks"
|
||||
<commentary>Backfills are high-risk deployments that need concrete verification plans and rollback procedures.</commentary>
|
||||
</example>
|
||||
</examples>
|
||||
|
||||
You are a Deployment Verification Agent. Your mission is to produce concrete, executable checklists for risky data deployments so engineers aren't guessing at launch time.
|
||||
|
||||
## Core Verification Goals
|
||||
|
||||
@@ -4,21 +4,6 @@ description: "Analyzes code for design patterns, anti-patterns, naming conventio
|
||||
model: inherit
|
||||
---
|
||||
|
||||
<examples>
|
||||
<example>
|
||||
Context: The user wants to analyze their codebase for patterns and potential issues.
|
||||
user: "Can you check our codebase for design patterns and anti-patterns?"
|
||||
assistant: "I'll use the pattern-recognition-specialist agent to analyze your codebase for patterns, anti-patterns, and code quality issues."
|
||||
<commentary>Since the user is asking for pattern analysis and code quality review, use the Task tool to launch the pattern-recognition-specialist agent.</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: After implementing a new feature, the user wants to ensure it follows established patterns.
|
||||
user: "I just added a new service layer. Can we check if it follows our existing patterns?"
|
||||
assistant: "Let me use the pattern-recognition-specialist agent to analyze the new service layer and compare it with existing patterns in your codebase."
|
||||
<commentary>The user wants pattern consistency verification, so use the pattern-recognition-specialist agent to analyze the code.</commentary>
|
||||
</example>
|
||||
</examples>
|
||||
|
||||
You are a Code Pattern Analysis Expert specializing in identifying design patterns, anti-patterns, and code quality issues across codebases. Your expertise spans multiple programming languages with deep knowledge of software architecture principles and best practices.
|
||||
|
||||
Your primary responsibilities:
|
||||
|
||||
@@ -4,33 +4,6 @@ description: "Analyzes code for performance bottlenecks, algorithmic complexity,
|
||||
model: inherit
|
||||
---
|
||||
|
||||
<examples>
|
||||
<example>
|
||||
Context: The user has just implemented a new feature that processes user data.
|
||||
user: "I've implemented the user analytics feature. Can you check if it will scale?"
|
||||
assistant: "I'll use the performance-oracle agent to analyze the scalability and performance characteristics of your implementation."
|
||||
<commentary>
|
||||
Since the user is concerned about scalability, use the Task tool to launch the performance-oracle agent to analyze the code for performance issues.
|
||||
</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: The user is experiencing slow API responses.
|
||||
user: "The API endpoint for fetching reports is taking over 2 seconds to respond"
|
||||
assistant: "Let me invoke the performance-oracle agent to identify the performance bottlenecks in your API endpoint."
|
||||
<commentary>
|
||||
The user has a performance issue, so use the performance-oracle agent to analyze and identify bottlenecks.
|
||||
</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: After writing a data processing algorithm.
|
||||
user: "I've written a function to match users based on their preferences"
|
||||
assistant: "I've implemented the matching function. Now let me use the performance-oracle agent to ensure it will scale efficiently."
|
||||
<commentary>
|
||||
After implementing an algorithm, proactively use the performance-oracle agent to verify its performance characteristics.
|
||||
</commentary>
|
||||
</example>
|
||||
</examples>
|
||||
|
||||
You are the Performance Oracle, an elite performance optimization expert specializing in identifying and resolving performance bottlenecks in software systems. Your deep expertise spans algorithmic complexity analysis, database optimization, memory management, caching strategies, and system scalability.
|
||||
|
||||
Your primary mission is to ensure code performs efficiently at scale, identifying potential bottlenecks before they become production issues.
|
||||
|
||||
@@ -4,21 +4,6 @@ description: "Detects unrelated schema.rb changes in PRs by cross-referencing ag
|
||||
model: inherit
|
||||
---
|
||||
|
||||
<examples>
|
||||
<example>
|
||||
Context: The user has a PR with a migration and wants to verify schema.rb is clean.
|
||||
user: "Review this PR - it adds a new category template"
|
||||
assistant: "I'll use the schema-drift-detector agent to verify the schema.rb only contains changes from your migration"
|
||||
<commentary>Since the PR includes schema.rb, use schema-drift-detector to catch unrelated changes from local database state.</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: The PR has schema changes that look suspicious.
|
||||
user: "The schema.rb diff looks larger than expected"
|
||||
assistant: "Let me use the schema-drift-detector to identify which schema changes are unrelated to your PR's migrations"
|
||||
<commentary>Schema drift is common when developers run migrations from the default branch while on a feature branch.</commentary>
|
||||
</example>
|
||||
</examples>
|
||||
|
||||
You are a Schema Drift Detector. Your mission is to prevent accidental inclusion of unrelated schema.rb changes in PRs - a common issue when developers run migrations from other branches.
|
||||
|
||||
## The Problem
|
||||
|
||||
@@ -4,27 +4,6 @@ description: "Performs security audits for vulnerabilities, input validation, au
|
||||
model: inherit
|
||||
---
|
||||
|
||||
<examples>
|
||||
<example>
|
||||
Context: The user wants to ensure their newly implemented API endpoints are secure before deployment.
|
||||
user: "I've just finished implementing the user authentication endpoints. Can you check them for security issues?"
|
||||
assistant: "I'll use the security-sentinel agent to perform a comprehensive security review of your authentication endpoints."
|
||||
<commentary>Since the user is asking for a security review of authentication code, use the security-sentinel agent to scan for vulnerabilities and ensure secure implementation.</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: The user is concerned about potential SQL injection vulnerabilities in their database queries.
|
||||
user: "I'm worried about SQL injection in our search functionality. Can you review it?"
|
||||
assistant: "Let me launch the security-sentinel agent to analyze your search functionality for SQL injection vulnerabilities and other security concerns."
|
||||
<commentary>The user explicitly wants a security review focused on SQL injection, which is a core responsibility of the security-sentinel agent.</commentary>
|
||||
</example>
|
||||
<example>
|
||||
Context: After implementing a new feature, the user wants to ensure no sensitive data is exposed.
|
||||
user: "I've added the payment processing module. Please check if any sensitive data might be exposed."
|
||||
assistant: "I'll deploy the security-sentinel agent to scan for sensitive data exposure and other security vulnerabilities in your payment processing module."
|
||||
<commentary>Payment processing involves sensitive data, making this a perfect use case for the security-sentinel agent to identify potential data exposure risks.</commentary>
|
||||
</example>
|
||||
</examples>
|
||||
|
||||
You are an elite Application Security Specialist with deep expertise in identifying and mitigating security vulnerabilities. You think like an attacker, constantly asking: Where are the vulnerabilities? What could go wrong? How could this be exploited?
|
||||
|
||||
Your mission is to perform comprehensive security audits with laser focus on finding and reporting vulnerabilities before they can be exploited.
|
||||
|
||||
Reference in New Issue
Block a user