holdout-validation
Skill0 starsChanged 4 months agoMITView on GitHub
Structural separation of test authorship from code authorship. Produces behavioral acceptance scenarios that implementation agents cannot see, evaluated independently by Guardian. Use when designing acceptance criteria, validating implementations against intent, or enforcing holdout-set discipline. DO NOT USE FOR: unit test writing (use guardian), implementation (use implementer), verifying task completion (use verification-before-completion), or any other test strategies beyond holdout validation, including integration and performance testing.
In this repository29 other files it gives its agents.
- architectSkill
- brainstormingSkill
- concise-planningSkill
- context-engineerSkill
- data-analystSkill
- data-deprecation-analysisSkill
- data-engineeringSkill
- analystSkill
- detectiveSkill
- editorSkill
- inspectorSkill
- data-narrativeSkill
- data-scienceSkill
- excalidraw-diagramSkill
- genai-securitySkill
- guardianSkill
- implementerSkill
- llm-app-patternsSkill
- llm-memSkill
- opsSkill
- prompt-librarySkill
- security-boundariesSkill
- story-masterSkill
- story-plannerSkill
- subagent-executionSkill
- systematic-debuggingSkill
- task-routingSkill
- thinkerSkill
- verification-before-completionSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 9 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 67
MUST NOT read files in .copilot/holdout/
- Very specific: line 68
If an implementation agent is given access to or asked to read a file in .copilot/holdout/, the agent MUST respond: "Access denied: holdout …
- Distinctive: line 81
If holdout scenarios don't exist:
- Distinctive: line 121
After completing the specification, the Architect writes 3–10 holdout scenarios per specification document (i.e., per discrete unit of work …
- Distinctive: line 132
If an implementation agent requests access to holdout files, the request is denied
- Distinctive: line 140
When one or more holdout scenarios fail, Guardian MUST block the review from passing and raise a finding requiring the implementation agent …
- Distinctive: line 183
When validating that software works for real users, not just for the test suite
- Distinctive: line 195
Does NOT replace unit or integration tests (those are still written by implementation agents)
- Distinctive: line 196
Does NOT contain implementation details or code snippets
- Distinctive: line 197
Does NOT get loaded by implementation agents (structural blindness is the mechanism)
- Distinctive: line 198
Does NOT override Guardian's existing review process (it extends it)
- Very specific: line 205
Guardian skipping holdout evaluation: If holdout files exist in .copilot/holdout/, Guardian MUST evaluate them.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Holdout Validation Skill - Structural Test Separation
Version: 9.0 | Updated: 01-July-2026 | Architect: Karim Bhalwani | Deps: architect, guardian, verification-before-completion
Dependencies
Load the following via read_file before using this skill. Skills marked ★ have disable-model-invocation: true and cannot self-invoke - they must be loaded explicitly.
~/.copilot/skills/architect/SKILL.md- spec and holdout scenario authoring patterns (required for the Architect role in this workflow)~/.copilot/skills/guardian/SKILL.md- holdout evaluation is a Guardian-owned phase; QA patterns apply~/.copilot/skills/verification-before-completion/SKILL.md★ - completion gate; confirm all holdout scenarios are evaluated before declaring review complete
When to Load This Skill
Load this skill when:
- Architect is producing a specification and needs to write holdout acceptance scenarios
- Guardian is reviewing an implementation that has associated holdout files in
.copilot/holdout/ - Validating that structural blindness between implementation and evaluation is maintained
- Setting up a new project's holdout directory structure
Overview
When the entity writing the code can also read the tests, the separation between implementation and validation is no longer optional. This skill enforces holdout-set discipline: behavioral acceptance scenarios are authored during design, stored separately from the codebase, and evaluated by a structurally independent reviewer (Guardian).
This addresses the documented pattern where reasoning models engage in test gaming - hardcoding return values, rewriting tests to match buggy code, and optimizing for "tests pass" rather than "software works."
Core Principle
A model that can see the answer key will use it. Design the system so it cannot.
Agent Access Rules
These rules are structural constraints, not behavioral suggestions. Reasoning models will use available information regardless of instructions.
Quick Reference
| Agent Role | Access |
| Architect | WRITE only |
| Implementation agents (dev, data, data-sci, ai) | NONE |
| Guardian | READ only |
| Context-engineer | READ only |
Detailed Rules by Role
Architect – WRITE only
- Authors holdout scenarios during specification
- Spec references the holdout file but does NOT include scenarios inline
Implementation agents (senior-developer, data-engineer, data-scientist, ai-engineer) – NONE
- MUST NOT read files in
.copilot/holdout/ - If an implementation agent is given access to or asked to read a file in
.copilot/holdout/, the agent MUST respond: "Access denied: holdout files are reserved for Guardian evaluation. Proceeding with spec-based testing only." and continue implementation using only the specification.
Guardian – READ only
- Loads holdout scenarios during review
- Evaluates implementation against them
Context-engineer – READ only
- Tracks holdout pass rates in retrospective documents
Exception: Missing Holdouts
If holdout scenarios don't exist:
- Implementation agents proceed normally with spec-based testing
- Guardian notes "No holdout scenarios found" in the review
- Guardian recommends Architect provide them for future iterations
Holdout Scenario Structure
What Is a Holdout Scenario?
A holdout scenario is an intent-level validation statement, not a unit test. It describes what must be true from the perspective of a real user, not what a function should return.
| Unit Test (Instruction) | Holdout Scenario (Intent) |
assert calculate_tax(100) == 7.5 | A customer in Ontario adding a $100 item to cart sees $107.50 at checkout |
assert response.status_code == 200 | A logged-in user requesting their profile receives their data within 2 seconds |
assert len(results) > 0 | A compliance officer searching for "GDPR violations" finds all flagged records from the last 90 days |
Scenario Format
## Holdout Scenario: [ID]
**Actor:** [Who is performing the action]
**Intent:** [What they are trying to accomplish]
**Preconditions:** [What must be true before the scenario starts]
**Action:** [What the actor does]
**Success Criteria:**
- [Observable outcome 1]
- [Observable outcome 2]
**Failure Modes:**
- [What should NOT happen]
**Priority:** [Critical | High | Medium]Workflow
During Design (Architect Produces)
- After completing the specification, the Architect writes 3–10 holdout scenarios per specification document (i.e., per discrete unit of work that has its own spec file)
- Scenarios focus on user-observable outcomes, not implementation details
- Scenarios are written to
.copilot/holdout/(or a user-specified directory) - Each scenario file is named
HOLDOUT-<feature>.md, matching the naming convention in the File Layout section - The spec references the holdout file but does NOT include the scenarios inline
During Implementation (Developer Is Blind)
- Implementation agents receive the spec but never receive the holdout scenarios
- Implementation agents write their own unit and integration tests based on the spec
- The structural separation ensures tests written by developers validate the spec, not the holdouts
- If an implementation agent requests access to holdout files, the request is denied
During Review (Guardian Evaluates)
- Guardian loads the holdout scenarios from
.copilot/holdout/ - For each scenario, Guardian evaluates whether the implementation satisfies the intent
- Guardian produces a Holdout Evaluation Report as part of its review
- Holdout failures are rated as High severity (they indicate spec-to-intent gaps)
- When one or more holdout scenarios fail, Guardian MUST block the review from passing and raise a finding requiring the implementation agent to address the gap before completion is declared. Guardian should reference the verification-before-completion skill to confirm all failures are resolved.
Holdout Evaluation Report Format
### Holdout Evaluation
| ID | Actor | Intent | Status | Evidence |
| ----- | -------- | --------------------------------- | ------ | ------------------------------------------- |
| H-001 | Customer | Add item to cart with correct tax | PASS | Tax calculation verified in checkout flow |
| H-002 | Admin | Export audit log for compliance | FAIL | Export function exists but omits timestamps |
**Holdout Pass Rate:** X/Y scenarios passed
**Findings:** [Specific gaps between implementation and user intent]File Layout
.copilot/holdout/
HOLDOUT-<feature-1>.md -- Scenarios for feature 1
HOLDOUT-<feature-2>.md -- Scenarios for feature 2
README.md -- Explains holdout directory purpose and access rulesThe holdout README.md should contain:
# Holdout Validation Scenarios
**Access Rule:** Implementation agents (senior-developer, data-engineer, data-scientist, ai-engineer)
MUST NOT read files in this directory. These scenarios are exclusively for
Guardian evaluation during review.
**Authored by:** Architect agent during specification phase.
**Evaluated by:** Guardian agent during review phase.When to Use
- Architect is producing a specification for a non-trivial feature
- Guardian is reviewing an implementation that has an associated spec
- Any time the same agent (or agent pipeline) is writing both code and tests
- When validating that software works for real users, not just for the test suite
Definition of Done
- Holdout scenarios written for every feature with a specification
- Scenarios stored in
.copilot/holdout/, not in the main codebase - Implementation agents confirmed to have no access to holdout files
- Guardian evaluation report produced with pass/fail per scenario
- Holdout failures tracked as High severity findings
Constraints
- Does NOT replace unit or integration tests (those are still written by implementation agents)
- Does NOT contain implementation details or code snippets
- Does NOT get loaded by implementation agents (structural blindness is the mechanism)
- Does NOT override Guardian's existing review process (it extends it)
Common Pitfalls
- Writing unit tests as holdouts: Holdouts are intent-level, not instruction-level. "Function returns 200" is a unit test. "User can log in and see their dashboard" is a holdout.
- Leaking holdouts into specs: The spec should reference that holdouts exist, but never include them inline. If the developer can read the spec and infer the holdouts, the separation is weakened.
- Skipping holdouts for "simple" features: Simple features still have user intent. Even a config change has a holdout: "The system behaves differently after this config is changed."
- Guardian skipping holdout evaluation: If holdout files exist in
.copilot/holdout/, Guardian MUST evaluate them. Skipping is a review gap.
Integration Points
| Phase | Input From | Output To | Context |
| Design | architect | Holdout scenario files | Architect writes scenarios after spec |
| Implementation | Spec (no holdouts) | senior-developer / data-engineer / data-scientist / ai-engineer | Developers work from spec only |
| Review | Holdout files + implementation | guardian | Guardian evaluates implementation against holdouts |
| Tracking | Holdout evaluation report | context-engineer | Track holdout pass rates over time |
References
- Example Holdout Scenario - Complete worked example showing 3 holdout scenarios for a user authentication feature
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

