- Home
- Skills
- Code Quality & Review
- feedback additive changes
feedback additive changes
Enforce additive-only changes and dormant code annotations to prevent regressions during refactors and migrations.
Free
Works with the AI Agents you already use
feedback additive changes
Example session with this skill installed
I need to refactor the payment processing logic to use the new Gateway class and remove the old unused helper methods in payments.py.
- Read your context and instructions
- Compiled the feedback additive changes
I have analyzed the request to refactor the payment processing logic. Following the additive-first protocol, I will preserve the existing helpers by marking them as dormant and implement the new Gateway logic in a parallel path to ensure zero impact on the current production flow.
Refactor Plan: Additive Payment Logic
| Component | Action | Additive Status |
|---|---|---|
payments.py | Annotate _legacy_format_request and _old_validate as DORMANT | ✅ Additive |
gateways/new_gateway.py | Create new implementation class | ✅ Additive |
api/v2/payments.py | Create new endpoint for the new logic | ✅ Additive |
migrations/ | Add gateway_ref_id as a NULLABLE column | ✅ Additive |
Code Implementation
# payments.py
# DORMANT — legacy helper; kept for compatibility with v1 mobile clients
# that bypass the main gateway logic.
def _legacy_format_request(data):
return {"amt": data.amount, "cur": "USD"}
class PaymentProcessor:
def process(self, data):
# DORMANT — legacy validation branch; no active providers
# use this path, but it is preserved for future failover.
if hasattr(data, "legacy_mode"):
return self._old_validate(data)
return self._new_gateway_process(data)
Next steps
- Verify that the linter passes with the new
DORMANTcomments. - Deploy the additive migration to create the nullable
gateway_ref_idcolumn. - Route a small percentage of traffic to the new
v2endpoint to validate the pattern.
Connects securely to your tools. The creator never sees your data.
About this skill
Refactoring production code often introduces regressions through accidental deletions or breaking changes to legacy dependencies. This skill enforces a strict additive-first methodology to ensure every modification is reversible and has a low blast radius. It prevents the common pitfall of "while I'm here" cleanups that destabilize existing systems.
What it does
- Enforces additive logic by ensuring new capabilities live alongside legacy code rather than replacing it.
- Protects dormant code by requiring explicit
DORMANTannotations instead of deletions for seemingly unused paths. - Guided decision-making using a tree to determine if a change is safe (additive) or high-risk (destructive).
- Strangler-fig migration support for moving toward new architectures without breaking the old ones.
- Safe schema evolution by defaulting to nullable additions and deferred constraints.
How it works
- Analyze the change request against the additive/destructive decision tree before any code is written.
- Apply the dormant protocol to annotate unreachable code paths with specific intent comments.
- Execute low-impact proofs by choosing minimal aggregates and new endpoints for pattern validation.
- Validate against the refactor checklist to ensure no existing shapes or paths were modified.
Frameworks & tools
This skill is framework-agnostic and works with any codebase using REST/GraphQL APIs, SQL databases, or modular file structures. It is particularly effective for teams managing high-uptime production systems or complex legacy migrations.
Why this beats prompting it yourself
Standard LLMs tend to be overly aggressive with "cleaning up" code, often deleting vital but dormant logic or breaking backward compatibility. This skill overrides that bias with a rigid safety-first protocol that prioritizes system stability over aesthetic purity.
Use cases
- Migrating a legacy API endpoint to a new architecture without breaking existing clients.
- Proving a new design pattern like Unit of Work on a low-risk subset of the domain.
- Performing database schema updates that require zero-downtime expand-contract cycles.
- Documenting the intent of unused code to prevent future accidental deletion.
Known limitations
This skill is not for greenfield projects where destructive changes have no blast radius. It requires manual confirmation for backfill logic in complex migrations.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean today
- Free to download with an account