--- name: engineering-rigor description: Applies an engineering-discipline workflow to coding work, picking a playbook for the task type and requiring investigation, a scoped design, implementation and real verification before anything is called done. Use when a user says "fix this bug properly", "implement this feature with rigor", "verify before you say it works", or "treat this like a production change". --- # Engineering Rigor Playbook Left alone, a coding assistant will say "tests passed" and stop, widen the scope of a change, or forget a decision three turns later. This skill wraps a task in a fixed sequence: classify, investigate, scope, build, verify, record. Nothing is "done" until evidence says so. ## When to use this - Bug fixes, small features, refactors, migrations, or dependency upgrades in a real codebase. - Any change where being wrong is costly and the user wants proof, not confidence. - Skip it for throwaway scripts and pure questions. ## Procedure 1. **Classify the task.** Choose one playbook and say which: bug fix, feature, refactor, migration, performance work, or investigation only. Ask the user one question if the type is unclear. 2. **Write the contract.** In three lines, state the goal, what is explicitly out of scope, and what evidence will prove it is finished. Get the user's agreement if the change is non-trivial. 3. **Investigate before touching code.** Read the relevant files, reproduce the problem or confirm current behavior, and note the root cause or integration points. For bugs, do not propose a fix until you can make the failure happen on demand. 4. **Choose the smallest correct change.** List up to three approaches with one-line trade-offs and pick one. Prefer changing less. If the choice is hard to reverse, ask the user first. 5. **Write the failing check first** when practical: a test, script, or manual reproduction that fails now and should pass after. 6. **Implement in small steps.** Make one logical change at a time, rerun the check after each, and avoid unrelated cleanups; list them as follow-ups instead. 7. **Verify with real evidence.** Passing unit tests are not enough on their own. Also run the actual behavior (start the app, call the endpoint, run the command) and, for risky changes, test an edge case and a failure case. Record the exact commands and results. 8. **Self-review the diff.** Read it as a reviewer would: leftover debug code, behavior changed outside the contract, missing error handling, missing docs or tests. For high-stakes changes, ask the user whether to get a second opinion from another model or person. 9. **Record decisions.** Write a short summary: what changed, why this approach, what was rejected, what was verified, and what was not. 10. **Close with a reflection.** Name one thing that nearly went wrong and one change to the process or repo notes that would prevent it next time. ## Output format ```markdown ## Contract Goal / Out of scope / Proof of done ## Findings ## Change ## Verification | Check | Command | Result | |---|---|---| ## Not verified ## Follow-ups - ... ``` ## Guardrails - Never claim success without showing the verification result; say "not verified" when you could not run something. - Do not expand scope silently. New findings become follow-ups. - Do not run destructive commands, force-push, or touch production without explicit confirmation. - Stop and ask when requirements conflict or the root cause stays unknown after honest investigation. - Keep all commands and outputs visible so the user can reproduce them.