1.**Read the issue.** Identify the reported behavior, expected behavior, and any reproduction steps the reporter provided. Use `gh issue view "$NUMBER" --json title,body,comments,labels`.
2.**Inspect the code.** Search and read the most likely module(s) involved based on the issue description. Identify candidate code locations.
3.**Attempt reproduction.** Reproduce the bug locally by running commands, tracing code paths, or writing a small test or script that demonstrates the issue.
4.**If reproduced** — follow the *Reproduced* sub-procedure below.
5.**If not reproduced** — follow the *Not reproduced* sub-procedure below.
### Reproduced
1. Describe the exact reproduction steps that reliably trigger the bug.
2. Identify the root cause or the most likely code location.
3. Create a branch named `reproduce/issue-<number>` from the current branch, commit any reproduction scripts, tests, or code you produced, and push the branch. If the branch already exists, force-push with `git push --force`.
4. Post the findings comment (see *Posting comments and labels*).
## Posting comments and labels
Post and verify in explicit sub-steps:
1.**Finalize the body once.** Do not iterate by posting multiple comments.
2.**Post it.**`gh issue comment "$NUMBER" --body-file -` (pipe via stdin, preferred) or `gh issue comment "$NUMBER" --body "..."`.
3.**Capture the result.** Note the comment URL returned by `gh`.
4.**Verify by reading comments back only.** Run `gh issue view "$NUMBER" --json comments` and confirm a comment by you with the exact body appears. If it is initially missing, wait briefly and read comments again up to two more times. Do not verify by posting another comment; do not rely on stdout alone.
5.**Handle failure without duplicates.** If `gh` returned a comment URL, or the post result is ambiguous, never post again; report an unverified result if the comment remains missing. Retry `gh issue comment` once only when GitHub definitively rejected the first request and the read-back confirms no exact matching comment exists. If the retry fails or cannot be verified, report the failure rather than posting again.