analyze-and-planlisted
Install: claude install-skill Optim-Agent/optim-plans
# Analyze and Plan
Use this skill for problem/failure inputs that need diagnosis before planning. Do not use it for ordinary feature planning, direct implementation-only requests, factual/explanation questions, trivial operations, or explicit no-plan requests.
## Workflow
1. Inspect available evidence first: repo files, logs, tests, command output, or user-provided symptoms.
2. Produce an in-message RCA summary before asking whether to plan. Use at most 5 Whys. Stop with `unknown` when evidence is insufficient; do not invent a cause.
3. Ask one choice prompt that includes the RCA summary. The choices are: recommended first to call `optim-plans`, second to review the summary only without a plan, `Other` second-last, and `Auto-complete` last.
4. On opt-out, stop after the summary. Do not write `PROBLEM_ANALYSIS.md` on opt-out.
5. On opt-in or Auto-complete choosing the recommendation, select the smallest fitting planning level, read and follow `../{selected-level}/SKILL.md`, and preserve that skill's first-turn contract.
6. Pass the original problem, RCA summary, evidence, and `PROBLEM_ANALYSIS.md` artifact intent as the planning request. The selected planning skill must initialize controller state and present and record its first controller-backed planning question before `PROBLEM_ANALYSIS.md` is written.
7. After opt-in, selected planning skill first controller-backed planning question recording, and selected run `artifact_dir` availability, write `PROBLEM_ANALYSIS.md` in