Instruction Layer Auditor

Audit and de-conflict complex agent instruction stacks to fix inconsistent behavior and logic bloat.

Install
cmdop skills install agensi-instruction-layer-auditor

The Instruction Layer Auditor is a skill designed for developers who build and maintain AI agents with complex, multi-layer instruction stacks. Modern agents commonly combine system prompts, developer instructions, repository-level rule files such as AGENTS.md, skill-specific logic, and persistent memory. When these layers collide, the result is behavior drift: agents that become over-cautious, ignore instructions, or hallucinate constraints they were never given.

This skill acts as a structured debugger for that layered configuration. It maps out every instruction layer present in a given stack and extracts the operational rules each layer defines. From there it identifies direct contradictions between layers—for example, a system prompt permitting an action that a repo-level rule prohibits—and flags hidden logic loops that cause unpredictable behavior.

Beyond detection, the skill produces a normalization plan. This plan specifies which rules are misplaced and recommends moving them to the highest-precedence layer where they belong, reducing logic bloat without requiring the developer to manually trace thousands of lines of stacked prompts. It also performs a risk assessment, predicting whether a given stack configuration is likely to cause over-verbosity or tool-use failures before those symptoms appear in production.

This skill is appropriate when an agent’s behavior has degraded after iterative prompt additions, when multiple contributors have modified an instruction stack independently, or when onboarding a new agent configuration that was inherited from another team.

Use cases

  • Map all instruction layers in an agent configuration to get a unified view of active rules
  • Detect direct contradictions between a system prompt and a repository-level AGENTS.md file
  • Identify hidden logic loops that cause an agent to ignore or over-apply specific instructions
  • Generate a rewrite plan that relocates misplaced rules to their correct high-precedence layers
  • Predict whether a prompt stack will cause tool-use failures or excessive verbosity before deployment
  • Audit an inherited agent configuration to understand and clean up accumulated instruction debt

When to use it

  • An agent has started ignoring instructions after multiple rounds of prompt additions
  • Multiple developers have contributed to an instruction stack without a coordinated structure
  • An agent exhibits over-cautious behavior or hallucinates constraints not explicitly defined
  • A repository-level rule file and system prompt are known to overlap and need reconciliation
  • Preparing an agent configuration for production and wanting to validate layer consistency first

When not to use it

  • The agent uses a single, flat system prompt with no layered or stacked instructions
  • The problem is model capability rather than instruction conflict—this skill addresses prompt logic, not model limitations
  • No tool list is exposed, so this skill provides reasoning and planning output rather than automated execution against live systems
  • Looking for runtime monitoring or logging of agent behavior—this skill audits static instruction configurations