testing-skills-with-subagents

Orchestrate RED-GREEN-REFACTOR cycles to harden skills against agent rationalizations.

130|8|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/sandgardenhq/sgai --skill testing-skills-with-subagents-sandgardenhq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-skills-with-subagents
Source: https://github.com/sandgardenhq/sgai/tree/main/cmd/sgai/skel/.sgai/skills/testing-skills-with-subagents
Command: npx skills add https://github.com/sandgardenhq/sgai --skill testing-skills-with-subagents-sandgardenhq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing skills without seeing real failures leads to vague rules that agents can rationalize around. This Skill applies a rigorous test-driven approach to process documentation so you identify concrete failure modes first, then iteratively harden the Skill until agents comply even under pressure.

Core Features & Use Cases

  • RED-GREEN-REFACTOR for Skills: Run baseline tests without the Skill, capture exact rationalizations, then write minimal rules and refactor to close loopholes.
  • Pressure Scenario Design: Craft realistic, multi-pressure scenarios (time, sunk cost, authority, exhaustion) that force explicit choices and expose true failure modes.
  • Rationalization Tables & Red Flags: Systematically record excuses, add explicit negations, and update descriptions with violation symptoms to prevent backsliding.
  • Use Case: Hardening a TDD enforcement Skill so agents consistently choose to delete code written before tests, citing the Skill under maximal time and sunk-cost pressures.

Quick Start

Run a baseline pressure scenario without the target Skill, document the agent’s rationalizations verbatim, then enable this Skill and iterate until the agent consistently complies under the same pressures.

Frequently Asked Questions about testing-skills-with-subagents

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test agent compliance under pressure scenarios?

Agent compliance under pressure scenarios is tested by designing realistic multi-pressure conflicts involving time, sunk cost, authority, and exhaustion. These scenarios force explicit choices, exposing true failure modes and capturing exact rationalizations agents use to bypass rules.

What is test-driven development for agent workflows?

Test-driven development for agent workflows applies RED-GREEN-REFACTOR cycles to process skills. It captures baseline failures without the target Skill, writes minimal rules, then refactors to close loopholes and eliminate rationalizations until agents comply durably under pressure.

How do I stop AI agents from rationalizing around rules?

To stop AI agents from rationalizing around process rules, systematically record their excuses in a rationalization table, add explicit negations for each excuse to the Skill, and update descriptions with violation symptoms to prevent backsliding under pressure.

How do I apply RED-GREEN-REFACTOR to skill design?

Applying RED-GREEN-REFACTOR to skill design involves running a baseline test without the Skill to capture failures, writing minimal rules to achieve agent compliance, and refactoring the Skill to close loopholes and harden against rationalizations under pressure.

Does TDD enforcement work for discipline-enforcing process skills?

TDD enforcement works for discipline-enforcing process skills where agents face conflicting incentives. It hardens compliance by capturing baseline failures, designing pressure scenarios, and re-verifying adherence to ensure agents consistently choose rule-following behavior.

What are the limitations of testing skills without baseline failures?

Testing skills without baseline failures leads to vague process rules that agents can easily rationalize around. Without capturing exact rationalizations verbatim upfront, you cannot iteratively harden the Skill to close loopholes and ensure durable compliance under pressure.