From evenbetter-ios
Workflow skill that scopes and orchestrates agent-driven remediation from numbered EvenBetter findings. Use when asked to fix issues from analyze-{N}.json, orchestrate fixes from evenbetter-validate-{N}.json, resolve findings with agents, fix only severe issues first, generate fallback fix prompts, or coordinate remediation batches for an analyzed project with .evenbetter/manifest.json history.
How this skill is triggered — by the user, by Claude, or both
Slash command
/evenbetter-ios:evenbetter-fixThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Coordinate the fix step of the EvenBetter loop after analysis and validation. Read numbered findings from the target project's `.evenbetter` reports, merge unresolved work across analyzer runs, ask a short scoping round before editing, plan deterministic remediation groups, and then execute fixes locally, with sub-agents, or as static prompts depending on user choice and environment support.
Coordinate the fix step of the EvenBetter loop after analysis and validation. Read numbered findings from the target project's .evenbetter reports, merge unresolved work across analyzer runs, ask a short scoping round before editing, plan deterministic remediation groups, and then execute fixes locally, with sub-agents, or as static prompts depending on user choice and environment support.
projectPath (required): Absolute filesystem path to the analyzed project.If projectPath is missing or not absolute, ask for the absolute path and stop until it is provided.
Load reports from projectPath/.evenbetter/ in this order:
manifest.json as the source of truth for numbered report history.evenbetter-validate-{N}.json, for the latest validated actionable run.analyze-{N}.json, for raw latest findings and warning/info scopes.evenbetter-validate.json, validate.json, or analyze.json only when no manifest exists; if legacy analyze.json exists, perform the documented auto-migration to analyze-1.json and initialize manifest.json before continuing.Treat validation output as the preferred evidence source for high-severity findings. From validator reports, act by default only on kept and downgraded findings. Never act on dropped findings unless the user explicitly requests raw analyzer findings or dropped-item review.
Use raw analyze-{N}.json for warning and info scopes when validation output only covers high-severity findings.
Before writing any state update, reread manifest.json from disk. EvenBetter assumes serial execution: only one analyzer, validator, or fixer run writes .evenbetter/ at a time.
Build work items by violation id across all manifest runs:
state.status is fixed, rejected, or duplicate_of, skip it.state.status is deferred, include it only when the user explicitly opts into deferred work.state.status is open, include it.decision, confidence, reasoning, and downgraded_severity to matching violation IDs from kept and downgraded.dropped findings by default, even if the analyzer violation is still open.When two reports disagree, newest analyzer state wins for state, and newest validation report wins for validator evidence. Per-run analyzer files remain the source of truth for the mutable state block.
Do not start remediation before a short closed-ended scoping step. If a question tool is available, use it. In Codex Plan mode, use request_user_input; otherwise ask concise plain-text questions and wait. Do not simulate an unavailable tool call.
Ask only what materially changes the run. Cover these decisions unless already clear from the user request:
error and validator kept.error plus warning.info.Each closed-ended question must offer 3 or 4 concrete options with one marked as recommended when there is a safe default. Avoid open-ended questions unless the required decision cannot be represented as structured choices.
Convert each selected finding into a traceable work item before grouping:
source_report: absolute path to the report used.source_kind: manifest, evenbetter-validate, validate, or analyze.source_analyze_report: absolute path to the originating analyze-{N}.json.source_validate_report: absolute path to the paired evenbetter-validate-{N}.json when available.originating_run: analyzer run number where the mutable state must be written.work_item_id: the stable violation id; use <rule_id>:<file_path>:<line_number> only for legacy reports without IDs.state: the current violation state object.rule_id, severity, domain, dimension, file_path, and line_number.summary, why_fix, fix_description, fix_code, ai_fix_prompt, and auto_fixable when available.guideline_reference and corpus clause/source details when available.decision, confidence, reasoning, and downgraded_severity when available.When normalizing work items, load ../../corpus/index.json when it exists and enrich each rule_id with matching clause_id, corpus_version, source_url, retrieved, reference_file, and anchor. If the index is unavailable, continue from the report's guideline_reference and note the missing corpus metadata in the final verification gap.
For validator reports, the original analyzer violation usually lives under original_violation; preserve the validator wrapper and the original violation so the final summary can trace both.
Reject path traversal. Resolve source files as projectPath / file_path and ensure the result stays inside projectPath. Resolve report paths as projectPath/.evenbetter / filename and ensure they stay inside .evenbetter/.
Sort selected work items by:
error before warning before info.Group work items for edit safety:
file_path always belongs to one group.Present a brief execution plan before edits when the plan includes more than one group or any parallelism.
Use the existing codebase patterns. Do not rewrite unrelated code, reformat entire files, or revert user changes. Keep each change tied to one or more work items.
When sub-agents are permitted and selected:
When sub-agents are unavailable or not permitted, process the planned groups sequentially in priority order using the same group boundaries.
When static prompt mode is selected, generate one prompt per group or file. Each prompt must include the selected work items, source file paths, traceability IDs, and acceptance criteria. Do not edit source files in static prompt mode.
After each completed fix attempt, update the originating analyzer report's violation state:
state.status: fixedstate.decidedIn: current manifest currentRunstate.decidedBy: fix-skillstate.reason: null unless a concise fix note is usefulstate.duplicateOf: nullThen update the matching manifest run summary. Set report/run status to fixed when no open or deferred items remain for that run; otherwise set it to partially_fixed.
Never claim a work item is fixed before the source change is complete and verification was attempted or the verification gap is explicitly stated.
Proceed without interruption when the finding is clear, low risk, source context still matches, and the fix follows local code patterns.
Pause for a closed-ended resolution decision when any of these are true:
auto_fixable is false or missing and the fix changes behavior.Use 3 or 4 concrete options and mark one recommended choice. Recommended defaults should favor standards-compliant, user-impacting fixes over suppression. Acceptable options include:
Persist the selected option immediately in the originating analyzer report when it is a decision rather than a source fix:
state.status = "rejected", state.decidedIn = currentRun, state.decidedBy = "user", state.reason = <user reason>.state.status = "deferred", state.decidedIn = currentRun, state.decidedBy = "user", state.reason = <user reason>.Record the selected option in the final summary with the originating work item ID.
Only mutate violation state blocks in analyzer reports. Do not rewrite older analyzer report content except for the specific state object of the affected violation. Do not change rule metadata, source excerpts, scoring, summaries, or validator result arrays.
After every state mutation:
manifest.json.summary counts from its analyzer report.status to fixed, partially_fixed, or preserve validated/pending_validation when no fix decision was made.run.status to match the manifest run status when applicable.latest.analyze, latest.validate, currentRun, and unrelated run entries.Project memory may mirror these decisions for convenience, but the in-repo manifest and analyzer report state are the only authoritative records.
Track group status deterministically. In Codex, use update_plan when available for multi-group runs. Keep status labels aligned to the actual workflow: pending, in progress, blocked for user decision, fixed, skipped, or failed verification.
After each group, inspect the diff for scope creep and run the most relevant available verification. For SwiftUI/iOS fixes, prefer the project's normal build or test command when discoverable; otherwise perform static checks and explain any verification gap.
At the end, summarize:
Never claim a finding is fixed unless the source change is complete and verification was attempted or the verification gap is explicitly stated.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub mellobirkan/evenbetterframework --plugin evenbetter-ios