Improve and ship
Investigate and fix a bug
Turn a vague failure into a reproducible case and a focused regression fix.
What you will work toward.
A supported root-cause explanation, a minimal fix, and a check that fails before and passes after.
Make this workflow yours.
Choose your AI tool, describe your task, and copy one complete project brief. Your inputs stay in this tab.
Includes your prompt, selected references, skill instructions, setup steps, and checks. Use your own AI account; Pristren does not run a model here.
Describe your project or task to prepare your brief.
Read the complete brief
Investigate and fix the bug in [Describe the project, audience, and useful result.]. Respect Use existing project conventions. State assumptions and verify the result.. Start from the reported behavior and expected result. Inspect applicable project guidance and identify a minimal reproduction using safe data. Record the affected environment and the exact observable failure. If you cannot reproduce it, state what is missing and narrow the uncertainty; do not invent a root cause. Trace the failing data or control flow to the smallest responsible boundary. Separate evidence from hypotheses. Check nearby callers and state transitions so the proposed fix addresses the cause rather than hiding the symptom. Implement a focused change consistent with existing conventions. Avoid opportunistic refactors and unrelated formatting. Add or adapt a meaningful regression check at the appropriate level. Where feasible, demonstrate that the check fails against the prior behavior and passes after the fix. Run the relevant existing checks, inspect the diff, and describe the root cause, changed behavior, and any remaining cases. Do not claim the whole application is verified from one successful test. Execution environment: Codex. Follow applicable project instructions and verify the requested result. Workflow https://pristren.com/workflows/debug-a-bug/ Expected result A supported root-cause explanation, a minimal fix, and a check that fails before and passes after. Before you begin - Observed behavior, expected behavior, and reproduction steps. - An affected build or commit and safe sample data. - The existing test or diagnostic commands. Setup for Codex - Start Codex in the repository and read applicable AGENTS.md guidance. Include only the files this task needs. - Reproduce the reported behavior and record evidence before editing the implementation. - Use the acceptance checks below to assess the result; an agent completion message is not evidence that the task passed. Selected resources - Reproduce before fixing: https://pristren.com/resources/reproduce-before-fix/ Use the published resource’s Download SKILL.md action, or copy its complete original SKILL.md text. Draft resources are not publicly downloadable. Save the supplied SKILL.md as .agents/skills/reproduce-before-fix/SKILL.md in the project. Review it before use. Open the project in your tool and select reproduce-before-fix by name; check that it resolves to this project-local version. Read the resource below and apply only the parts relevant to the current task. Inspect the loaded skill before using it on a representative task. This page documents setup; it has not performed the installation for you. mkdir -p .agents/skills/reproduce-before-fix Skill instructions (Reproduce before fixing) --- name: reproduce-before-fix description: Investigate a reported software defect and verify a minimal correction when a concrete failure or regression is supplied. --- # Reproduce before fixing Convert the reported symptom into a repeatable input and expected behavior. Record the environment and the exact observable failure. If a safe reproduction is unavailable, state the limitation and inspect the relevant path before changing behavior. Trace the failing input through its call path. Identify the first point where observed behavior departs from the intended contract. Treat logs, tests, and source as evidence; do not assume the most recent edit caused the defect. Choose the smallest change that corrects the demonstrated cause. Preserve unrelated behavior and human edits. Add a regression check when it captures a meaningful boundary or the failure is likely to return. Avoid a test that only asserts the current implementation's wording or internal structure. Run the reproduction against the correction. Exercise the nearest relevant edge case, then the existing checks appropriate to the affected area. If a check fails for a separate reason, distinguish that failure and retain its evidence instead of suppressing it. Report the trigger, cause, resulting behavior, verification, and any unresolved limitation. Do not claim that a defect is fixed solely because a patch compiles. - Investigate and fix a bug — master prompt: https://pristren.com/resources/debug-a-bug-prompt/ Use the task-specific master prompt above. Execution 1. Reproduce the failure and record expected versus actual behavior. 2. Trace the relevant boundary and test the strongest hypothesis. 3. Implement the smallest coherent fix and a regression check. 4. Run relevant checks and inspect the final diff for unrelated changes. Acceptance checks - The reproduction describes real observed behavior. - The explanation identifies the responsible boundary with evidence. - A meaningful regression check covers the reported case. - Relevant neighboring behavior passes and unrelated edits are absent. If something fails - The issue only appears in production: Compare configuration, data shape, and build mode without copying secrets or personal data into fixtures. - A retry hides the failure: Inspect timing and state ownership. Retrying can mask a race without fixing its cause. Inspect the project first. Report the changes, the checks actually run, and anything still unresolved. Ask before any deployment or external publication.
Tool setup and prerequisites
Tool setup checked against official documentation. Pristren has not executed this workflow through this tool.
- Start Codex in the repository and read applicable AGENTS.md guidance. Include only the files this task needs.
- Reproduce the reported behavior and record evidence before editing the implementation.
- Use the acceptance checks below to assess the result; an agent completion message is not evidence that the task passed.
Before you begin
- Observed behavior, expected behavior, and reproduction steps.
- An affected build or commit and safe sample data.
- The existing test or diagnostic commands.
Skills and tools included in your brief
Required resources are included. Add optional ones when your task needs them.
Required
Start with this workflow’s original task-specific master prompt.
Review instructionsOptional
Capture a browser-level regression when the bug is a user journey.
Review instructionsOptional
Use an external browser-testing procedure after inspecting its helper requirements.
Review instructionsWhat your AI will work through.
- Reproduce the failure and record expected versus actual behavior.
- Trace the relevant boundary and test the strongest hypothesis.
- Implement the smallest coherent fix and a regression check.
- Run relevant checks and inspect the final diff for unrelated changes.
Check the result before calling it done.
- The reproduction describes real observed behavior.
- The explanation identifies the responsible boundary with evidence.
- A meaningful regression check covers the reported case.
- Relevant neighboring behavior passes and unrelated edits are absent.
From Pristren’s own implementation
Pristren: fixing the incomplete project brief
A real handoff bug in this library: the page showed visual references, but the copied project brief omitted their design notes and several source links.
Inspect the corrected briefThe problem
An AI received a prompt and resource links without the reference context the visitor had seen.
The implementation
The complete brief includes selected reference URLs and design notes, tool setup, original skill instructions, execution steps, and acceptance checks.
What was checked and what remains unproven
- The old assembly was reproduced without the Forma, Unicorn Studio, and Spline reference URLs.
- Regression checks cover selected and excluded references, tool-specific setup, literal inputs, and original skill content.
- Copy tracking fires after a successful clipboard write, not just a button click.
This verifies the brief handoff and its regression cases. Copying a brief does not establish that the visitor completed the downstream project.
When something gets in the way.
The issue only appears in production
Compare configuration, data shape, and build mode without copying secrets or personal data into fixtures.
A retry hides the failure
Inspect timing and state ownership. Retrying can mask a race without fixing its cause.
How did your attempt go?
Try the brief in your AI tool first. Your feedback helps us find workflows that need attention.
Sources and review notes
- Codex skill guidanceReviewed 2026-11-17
- Claude Code skill guidanceReviewed 2026-11-17
- Cursor skill guidanceReviewed 2026-11-17