.agents/skills/code-changes/references/analyze.md
Start every task here, no matter how it arrived: issue link, PR number, verbal idea, bug report — with two exceptions that use a sharper deliverable instead: a bare "look at/triage issue #n" with no implementation asked for goes to issue-triage.md, and "handle the review comments on PR #n" goes to pr-review-comments.md. If the request already asks for a fix ("fix issue #n", "issue #n: users can't log in"), analysis and an implicit go are both present — use this file directly, not issue-triage.md. No code gets written or edited during this phase.
gh issue view <n> --comments / gh pr view <n> --comments, plus linked
issues, referenced discussions, and any code the report points at.git log -- <path>).Reproduce the problem when possible. A reproduction turns the analysis from a hypothesis into a fact and gives Phase 5 its verification case for free. When reproduction is impossible (platform, hardware, credentials), say so explicitly in the report and mark the fix as unverified-by-repro.
If root cause can't be pinned with confidence, or the fix looks architectural, security-sensitive, or irreversible, hand the specific question to the strongest available model instead of guessing — see escalate.md. Resume ownership of the phase once the question is answered.
A short analysis report to the user containing:
This is the root_cause / proposed_change / out_of_scope / repro_status / open_questions
artifact defined in artifacts.md — Plan reads it in that shape regardless of which
entry point produced it.
Report the analysis and wait for a go before implementing. This applies every time this phase is entered — including a return trip from Verify (see verify.md) — not only the first time. Skip the gate only when the user already gave the go in the request itself ("do it", "fix it and commit", "implement with Sonnet"). A go given for analysis is not a go for implementation, and a go given for the first pass does not carry forward to a re-diagnosis after a Verify failure.