scaffolding-tests

Capture code behavior by recording inputs and outputs as golden baselines.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/jyang234/ai-engineering-framework --skill scaffolding-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scaffolding-tests
Source: https://github.com/jyang234/ai-engineering-framework/tree/main/edi/internal/assets/skills/scaffolding-tests
Command: npx skills add https://github.com/jyang234/ai-engineering-framework --skill scaffolding-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scaffolding tests capture a codebase's current behavior so you can refactor safely without guessing how it should behave.

Core Features & Use Cases

  • Characterization testing: automatically record inputs and outputs to create a behavioral baseline.
  • Safe refactoring aid: detect any regressions by comparing post-change results to the golden baseline.
  • Planning & documentation: helps identify risky areas, document expectations, and guide test migrations.

Quick Start

Use scaffolding to create golden behavior snapshots for a module before refactoring.

Frequently Asked Questions about scaffolding-tests

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

FAQPage Schema
How do I capture current behavior before refactoring code?

Scaffolding tests capture your code's current behavior by recording inputs and outputs to create a golden baseline. Store these snapshots before refactoring, then compare results afterward to detect any regressions or unintended changes in functionality.

What is a golden master test and when should I use it?

A golden master test records actual outputs from your code as a reference baseline, then compares future runs against it to catch behavioral changes. Use it when you're refactoring legacy code or unfamiliar modules where expected behavior isn't fully documented.

How do I handle non-deterministic values in regression testing?

Scaffolding tests normalize non-deterministic values like timestamps and random IDs by masking or replacing them before comparison. This ensures golden baselines remain stable and reliable across test runs without false positives from inherently variable data.

Can I use characterization tests to document legacy code behavior?

Yes. Characterization tests automatically record how legacy code behaves with representative inputs, creating executable documentation of current functionality. This documents expectations and identifies risky areas before planning refactors or test migrations.

What's the difference between scaffolding tests and unit tests?

Scaffolding tests capture actual current behavior without asserting what's correct, while unit tests verify expected behavior. Use scaffolding first to establish baselines on existing code, then migrate to unit tests with explicit assertions as you refactor.

Do scaffolding tests work for detecting regressions after refactoring?

Yes. After refactoring, run scaffolding tests against your new code and compare outputs to the golden baseline. Any differences signal potential regressions, helping you catch unintended behavioral changes before deployment.