declutter-verification
Verification skill - confirms behavior preservation and quality improvement after refactoring
What this skill does
# Refactoring Verification
## The Verification Rule
```
╔═══════════════════════════════════════════════════════════════════╗
║ NO COMPLETION CLAIM WITHOUT VERIFICATION EVIDENCE ║
╚═══════════════════════════════════════════════════════════════════╝
```
## Purpose
Systematically verify that refactoring achieved its goals without breaking existing functionality.
## Verification Checklist
### 1. Behavior Preservation
```markdown
- [ ] All characterization tests pass
- [ ] All existing unit tests pass
- [ ] All integration tests pass
- [ ] All E2E tests pass
- [ ] No new test failures introduced
```
**Command:**
```bash
# Run full test suite
npm test # or
pytest # or
go test ./... # etc.
```
### 2. No Regression
```markdown
- [ ] Test coverage maintained or improved
- [ ] No new compiler/linter warnings
- [ ] No new runtime warnings
- [ ] Performance not degraded (if applicable)
```
**Commands:**
```bash
# Coverage check
pytest --cov --cov-fail-under=80
npm run test:coverage
# Lint check
npm run lint
pylint src/
```
### 3. Quality Improvement
Verify the refactoring achieved its purpose:
```markdown
- [ ] Target smell eliminated
- [ ] Complexity reduced
- [ ] Readability improved
- [ ] No new smells introduced
```
**Metrics to compare:**
| Metric | Before | After | Improved? |
|--------|--------|-------|-----------|
| Cyclomatic complexity | X | Y | ✓/✗ |
| Lines of code | X | Y | ✓/✗ |
| Nesting depth | X | Y | ✓/✗ |
| Method count | X | Y | ✓/✗ |
| Test coverage | X% | Y% | ✓/✗ |
### 4. No New Smells
Run smell detection on refactored code:
```markdown
- [ ] No new Long Methods
- [ ] No new Large Classes
- [ ] No new Feature Envy
- [ ] No dead code introduced
- [ ] No duplicate code introduced
```
### 5. Documentation Updated
```markdown
- [ ] Comments reflect new structure
- [ ] API docs updated (if interfaces changed)
- [ ] README updated (if architecture changed)
- [ ] Changelog updated
```
### 6. Git History Clean
```markdown
- [ ] Each commit represents one atomic change
- [ ] Commit messages are descriptive
- [ ] No "WIP" or "fix" commits left
- [ ] No merge conflicts unresolved
```
## Verification Report Template
```markdown
# Refactoring Verification Report
## Summary
- **Target:** [What was refactored]
- **Goal:** [What improvement was intended]
- **Status:** [VERIFIED / ISSUES FOUND]
## Test Results
- Unit tests: ✓ All passing (X tests)
- Integration tests: ✓ All passing (Y tests)
- E2E tests: ✓ All passing (Z tests)
- Coverage: X% → Y% (improved/maintained/degraded)
## Quality Metrics
| Metric | Before | After | Change |
|--------|--------|-------|--------|
| Complexity | X | Y | -Z% |
| Lines | X | Y | -Z% |
| Smells | X | Y | -Z |
## Smell Check
- [x] No new smells introduced
- [x] Target smell eliminated
## Issues Found
(List any problems discovered)
## Conclusion
Refactoring [VERIFIED/REJECTED]. [Additional notes]
```
## Red Flags - STOP
| Thought | Reality |
|---------|---------|
| "Tests passed, we're done" | Check coverage, smells, and quality metrics too |
| "The change is obviously correct" | Run the verification anyway |
| "I'll verify later" | Verify NOW before moving on |
| "One test failure is fine" | NO. Fix it or revert. |
## Verification Flow
```dot
digraph verification {
rankdir=TB;
node [shape=box];
start [label="Refactoring Done" shape=ellipse];
tests [label="Run All Tests"];
pass [label="All Pass?" shape=diamond];
coverage [label="Check Coverage"];
cov_ok [label="Coverage OK?" shape=diamond];
smells [label="Run Smell Detection"];
smell_ok [label="No New Smells?" shape=diamond];
metrics [label="Compare Metrics"];
improved [label="Quality Improved?" shape=diamond];
verified [label="VERIFIED" shape=ellipse];
fail [label="FAILED\nRevert & Retry" shape=ellipse];
start -> tests;
tests -> pass;
pass -> coverage [label="YES"];
pass -> fail [label="NO"];
coverage -> cov_ok;
cov_ok -> smells [label="YES"];
cov_ok -> fail [label="NO"];
smells -> smell_ok;
smell_ok -> metrics [label="YES"];
smell_ok -> fail [label="NO"];
metrics -> improved;
improved -> verified [label="YES"];
improved -> fail [label="NO"];
}
```
## Signal
When verification passes, emit:
```
VERIFICATION_COMPLETE
```
When verification fails, emit:
```
VERIFICATION_FAILED: [reason]
```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.