spark-find-simplifications
Use when a working Spark implementation should be simplified without changing its observed behavior, ownership, compatibility, or public contract.
SKILL.md.agents/skills/spark-find-simplifications/SKILL.md
GitHubSpark simplification search
Simplify only after the behavior and validation baseline are known.
Procedure
- Identify the owner, public behavior, compatibility constraints, and tests that establish the current contract.
- Start from code-review findings or inspect for duplicate branches, overlapping adapters, zero-semantic wrappers, unused metadata, unnecessary abstractions, dead compatibility paths with explicit exit criteria, and state derived in more than one place.
- For each candidate, state its semantic payload. If deleting or inlining it loses no policy, conversion, owner boundary, invariant, or supported compatibility, prefer removal.
- Trace polling and opportunistic reconciliation back to the authoritative mutation path. Prefer keeping the owner correct at write time over another cache, scan, or repair loop.
- Check collection limits before downstream filtering or skipping for fairness and starvation errors.
- Prefer deleting indirection or moving semantics into the existing owner over introducing another framework, package, schema, facade, budget, or exception.
- Compare each candidate against production callers and focused validation. Require live call-path evidence before declaring code unreachable.
- Recommend the smallest independent simplification and the evidence needed to prove equivalence.
Stop when a simplification would alter serialization, authority, lifecycle, or user-visible behavior without explicit acceptance criteria. Return candidates, evidence, recommendedSlice, validation, and rejectedIdeas.