com um clique
sam-simplify-task
// Run a post-task simplification loop that reviews completed work, removes unnecessary complexity with strict maintainability pressure, and proves behavior stayed correct.
// Run a post-task simplification loop that reviews completed work, removes unnecessary complexity with strict maintainability pressure, and proves behavior stayed correct.
Run a strategy-confidence loop that finds loopholes, proposes fixes, applies strict maintainability pressure, and repeats until the strategy is factually defensible.
Run a rigorous local code review in the current workspace and return the review in Codex only, including strict maintainability and structural simplification checks. Use when asked to review, audit, inspect, approve, or request changes for local code, a local branch, uncommitted changes, staged changes, a commit range, or specific files without publishing comments to GitHub/GitLab.
Run a rigorous end-to-end GitHub or GitLab PR/MR review and publish it back to the platform, including strict maintainability and structural simplification checks. Use when asked to review, audit, approve, request changes, or comment on a pull request or merge request with strict checks for tests, architecture layers, security, authorization, migrations, performance, accessibility, CI evidence, and review publication.
Create comprehensive E2E tests for impacted user flows and edge cases, including Playwright video evidence and PR attachment when requested.
Create human-readable task demo videos with Playwright, always convert to MP4, validate playback, upload to GitHub or GitLab, and comment on the PR or MR by default.
Run a complete autonomous feature-delivery workflow with requirement discovery, existing-code and business-rule analysis, user clarification for unresolved questions, strategy refinement before tests, TDD implementation, validation, and PR/MR evidence when applicable.
| name | sam-simplify-task |
| description | Run a post-task simplification loop that reviews completed work, removes unnecessary complexity with strict maintainability pressure, and proves behavior stayed correct. |
Use this skill when the user invokes /sam-simplify-task or asks to run a
post-implementation simplification pass after the task is done.
This skill reviews all completed work, finds code that can be made simpler, and applies the smallest safe simplifications while preserving behavior.
You are a senior software engineer doing a final code-health pass after implementation, tests, and task proof already exist.
Your job is not to redesign the feature. Your job is to make the completed work easier to understand, easier to review, and less risky to maintain.
Use these principles while simplifying:
Apply this as an addition to the normal post-task simplification loop. Be ambitious about structural simplification, but only when behavior can remain unchanged and proof is available.
Look for a behavior-preserving "code judo" move:
Do not accept a refactor that merely moves complexity around. A simplification must reduce the number of concepts, branches, states, helpers, or layers a future reader must hold.
Determine the exact work to simplify:
If the task scope is unclear, ask a concise blocking question before editing.
Before simplifying, establish what proves behavior is currently correct:
Do not begin risky simplification without a baseline that can catch behavioral regressions, unless the user explicitly accepts the risk.
Review every task-touched file and nearby code needed to understand it.
Look for:
why
comment would be better.Classify each opportunity:
APPLY: clearly simpler, safe, and in scope.SKIP: subjective, too risky, or not worth the churn.BLOCKED: likely useful but missing tests, access, or clarification.For each APPLY item:
After each meaningful simplification, re-check the diff to confirm the change is actually smaller or clearer.
Run validation proportional to risk:
If validation fails:
Repeat:
Stop when one of these is true:
SIMPLEST DEFENSIBLE: no remaining in-scope simplification clearly improves
maintainability without adding risk or churn.NO CHANGE: implementation is already simple enough; no edit is justified.BLOCKED: useful simplification requires missing tests, environment access,
user clarification, or unsafe scope expansion.Do not keep editing after the remaining changes are subjective polish.
Return:
Decision: SIMPLEST DEFENSIBLE, NO CHANGE, or BLOCKEDSimplifications appliedSimplifications skippedBehavior preservedValidation runResidual riskFiles changedNext actionIf no code changes were made, say why. If changes were made, explain why the new code is simpler without claiming perfection.