backfill-feature

Backfill retroactive ADRs, Gherkin specs, and characterization tests for existing software features.

Updated Jun 3, 2026
One-click install
npx skills add https://github.com/0xdeafcafe/skills --skill backfill-feature
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backfill-feature
Source: https://github.com/0xdeafcafe/skills/tree/main/skills/backfill-feature
Command: npx skills add https://github.com/0xdeafcafe/skills --skill backfill-feature

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you safely change existing code that lacks clear architecture records, specs, or tests. It reduces the risk of breaking hidden assumptions by first reconstructing what the feature does today, why it likely exists in its current form, and which behaviors must stay stable until the planned change is made.

Core Features & Use Cases

  • Retroactive ADR creation: Reads the relevant code and drafts a reverse-engineered architecture decision record that captures current design, inferred rationale, and load-bearing constraints.
  • Behavior characterization: Produces a Gherkin spec for the feature's current behavior, including golden paths and edge cases already handled by the code.
  • Baseline test lock-in: Writes characterization tests that pass against the current implementation so future changes are layered on top of a documented, verified baseline.
  • Use case: Before refactoring an old order cancellation flow with no ADR and weak test coverage, use this Skill to document the current architecture, capture actual behavior, and add tests that prevent accidental regressions during the upcoming change.

Quick Start

Ask the assistant to backfill the ADR, spec, and characterization tests for the existing feature area before making any code changes.

Frequently Asked Questions about backfill-feature

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

FAQPage Schema
How do I document legacy code behavior before refactoring?

To document legacy code before refactoring, you can backfill missing architectural records and Gherkin specs by reading the current codebase, confirming the inferred baseline, and generating retroactive ADRs to capture existing design constraints.

What is characterization testing for existing software features?

Characterization testing for existing features involves writing tests that lock in the exact current behavior of the code, creating a verified baseline that prevents accidental regressions during future modifications or refactors.

How do I write a retroactive ADR for an undocumented module?

Writing a retroactive ADR for an undocumented module requires reading the existing code to reverse-engineer the current design, inferring the original rationale, and drafting an architecture decision record that captures load-bearing constraints.

Can I generate Gherkin specs for code paths with no existing tests?

Yes, you can generate Gherkin specs for untested code paths by analyzing the implementation to capture both golden paths and handled edge cases, producing a behavior specification that reflects the actual current logic.

What is the best way to prevent regressions when modifying old code?

The best way to prevent regressions when modifying old code is to first backfill baseline documentation and write characterization tests that pass against the current implementation, ensuring future changes layer safely on top.

What happens to characterization tests when the code cannot be executed?

When code execution is unavailable, characterization tests are still generated based on the inferred behavior but are explicitly marked as unverified, ensuring the baseline is documented while signaling that execution validation is pending.