{"id":18668,"plugin_id":"plugins_6a8874a5fe5081919d0e22dacb040180","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T23:14:53.056Z","digest":"9714d8d7568769dfdd83e978aa2448b92f10aba60a37cb183ac6cf279941f6ed","against":null,"payload":{"description":"Reproduce, isolate, diagnose, and repair a real software defect through evidence, competing hypotheses, root-cause analysis, a minimal controlled fix, focused tests, and regression verification. Use when existing software behaves incorrectly, crashes, fails a build or test, or has an observable regression. Do not use for speculative red-team critique, planned feature implementation, broad refactoring, or performance optimization without a defect.","included_files":[{"relative_path":"agents/openai.yaml","size_in_bytes":295}],"name":"diagnose-and-fix-software-defects","skill_md_contents":"---\nname: diagnose-and-fix-software-defects\ndescription: Reproduce, isolate, diagnose, and repair a real software defect through evidence, competing hypotheses, root-cause analysis, a minimal controlled fix, focused tests, and regression verification. Use when existing software behaves incorrectly, crashes, fails a build or test, or has an observable regression. Do not use for speculative red-team critique, planned feature implementation, broad refactoring, or performance optimization without a defect.\n---\n\n# Diagnose and Fix Software Defects\n\nRepair the verified root cause without hiding the symptom through a product change, weakened test, disabled check, or unrelated refactor.\n\n## Diagnose before fixing\n\n1. Define expected behavior, observed behavior, environment, affected scope, severity, and evidence.\n2. Inspect repository instructions, recent changes, logs, stack traces, failing tests, dependencies, configuration, and relevant code.\n3. Reproduce the defect with the smallest reliable case. If reproduction is impossible, state what remains unverified and gather safe diagnostics.\n4. Establish a before-state and preserve user work.\n5. Form competing hypotheses and list evidence that would confirm or falsify each.\n6. Isolate the failure across input, state, component, interface, environment, timing, data, dependency, and deployment boundaries.\n7. Identify the root cause and causal chain. Distinguish it from symptoms and contributing conditions.\n\nDo not claim a root cause merely because one edit makes the symptom disappear.\n\n## Authority and repair\n\nUse the shared [decision-authority model](../../shared/expert-system/decision-authority-model.md). A bug report does not authorize changing intended product behavior, architecture, contracts, security, data semantics, visual direction, or scope. Stop on Class-1 ambiguity.\n\nImplement the smallest coherent root-cause fix. Add or strengthen a regression test that fails before the fix and passes after it when feasible. Do not delete, skip, relax, snapshot-update, or mock away a meaningful failing test without explicit justification and authority.\n\nIf the repair requires broad structural transformation, route to `$refactor-and-migrate-codebases`. If the primary issue is measured runtime performance, route to `$optimize-runtime-performance`.\n\n## Verification\n\nRun the reproducer, focused tests, connected integration tests, relevant regression suite, type/lint/build checks, and applicable security, accessibility, browser, data, or deployment checks. Inspect the real behavior after the fix. Compare before and after evidence and check that the failure does not reappear under boundary conditions.\n\nUse independent review for critical defects or risky fixes. Correct compliance with a defective specification is not success; if expected behavior itself is defective or contradictory, return the issue to its owner rather than coding around it.\n\n## Output\n\nReturn reproduction evidence, root cause and causal chain, affected scope, fix manifest, decision class, tests and actual results, regression coverage, unrelated changes avoided, rollback, unresolved risks, and whether the defect is verified fixed, mitigated, not reproduced, or blocked.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}