From dev-core
Deep technical analysis — explore existing code, risks, alternatives. Triggers: "analyze" | "technical analysis" | "explore the problem" | "how deep is it" | "deep dive" | "investigate this" | "analyze this feature" | "what are the risks" | "explore the codebase" | "look into this".
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-core:analyzeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Let:
Let:
α := artifacts/analyses/{N}-{slug}-analysis.mdx
φ := artifacts/frames/{slug}-frame.mdx
ρ := expert reviewer set
Ω := skill: "interview"
Q := decision presentation (Pattern A — read ${CLAUDE_PLUGIN_ROOT}/../shared/references/decision-presentation.md)
Frame → analysis. Codebase exploration → expert review → user approval gate.
¬spec, ¬worktree. Shape phase only. Spec → /spec.
/analyze --issue N → read frame for #N, produce α
/analyze --frame path → read frame at path, produce α
Parse args → locate φ.
--issue N:
# Find frame by issue number in frontmatter or filename
grep -rl "issue: N" artifacts/frames/ 2>/dev/null | head -1
# Fallback: glob by any slug
ls artifacts/frames/*.mdx 2>/dev/null
--frame path → read directly.
¬φ found → → DP(B) "No frame doc found. Run /frame --issue N first, or provide path directly?"
Read φ → extract: title, issue, tier, problem statement, constraints.
Glob artifacts/analyses/* — match issue# or slug from φ.
∃ α:
type: brainstorm ∈ frontmatter → treat as brainstorm (¬analysis), offer to promote.Search codebase based on φ problem + constraints:
# Find files relevant to the domain (adapt to actual problem):
Glob("{backend.path}/src/**/*.ts") # backend domain
Glob("{frontend.path}/src/**/*.tsx") # frontend domain
Grep("keyword", type: "ts") # symbol/pattern search
Read key files (max 5–8 most relevant). Note: paths, patterns, dependencies, risks.
Ω, args: "topic text from frame" (Analysis type).
Captures: source (verbatim trigger) | problem (broken/missing) | outcome (success ¬prescribing solution) | appetite (time budget) | shapes (2–3 mutually exclusive arch approaches: name + trade-offs + scope) | constraint alignment (which constraints eliminate which shapes).
Pre-fill context from φ — skip answered questions.
Write α:
---
title: "{title}"
description: "{one-line description}"
---
## Source
{verbatim trigger — exact quote, ticket, Slack message}
## Problem
{what is broken or missing today, in plain language}
## Outcome
{what success looks like — without prescribing a solution}
## Appetite
{time budget — e.g. "1-week cycle", "2 sprints"}
## Shapes
### Shape 1: {name}
{description}
**Trade-offs:**
- Pro: ...
- Con: ...
**Rough scope:** {XS | S | M | L | XL}
### Shape 2: {name}
...
## Fit Check
{Which shape best fits constraints + appetite, and why. Which shapes are eliminated.}
When analysis involves data flow or architectural choices, include mermaid in ## Fit Check or ## Shapes:
flowchart): show key structural differences visuallyflowchart): diagram current state for concrete findingsTier S may omit Shapes + Fit Check.
∃ specific technical question → spawn domain expert via Task. See references/expert-consultation.md.
Skip if ¬technical uncertainty in Step 2 findings.
Signals: unfamiliar 3rd-party behavior | undocumented internal APIs | performance unknowns | conflicting docs.
∃ signals → → DP(A) Spike now (throwaway worktree, test hypothesis) | Skip (→ expert review).
Spike flow:
EnterWorktree(name: "spike-{N}") — creates isolated throwaway worktreegit checkout -b spike/{N} origin/${BASE} (where BASE = staging ∨ main)ExitWorktree(action: "remove", discard_changes: true) — clean up throwaway worktreeSee references/investigation.md if ∃, else use inline flow above.
Auto-select ρ (¬ask user):
| ρ | When | Focus |
|---|---|---|
| doc-writer | Always | Structure, clarity |
| product-lead | Always | Product fit, Outcome quality, Problem↔Outcome alignment |
| architect | ∃ arch / trade-offs / multi-domain | Technical soundness, shape feasibility |
| devops | ∃ CI/CD / deploy / infra | Operational impact |
∀ r ∈ ρ → spawn ∥ Task(subagent_type: "<r>", prompt: "Review α for <focus>. Return: good / needs improvement / concerns.").
Incorporate feedback → revise α → note unresolved concerns.
Open α: code artifacts/analyses/{N}-{slug}-analysis.mdx.
Present summary: shapes found, trade-offs, recommended shape, unresolved concerns.
→ DP(A) Approve → update issue status → done | Revise → collect feedback → revise α → loop from Step 3.
On approval → commit: git add artifacts/analyses/{N}-{slug}-analysis.mdx + commit per CLAUDE.md Rule 5.
bun ${CLAUDE_PLUGIN_ROOT}/skills/issue-triage/triage.ts set <N> --status Analysis
Inform: "Analysis complete. Run /spec --issue <N> to generate the solution spec."
| Scenario | Behavior |
|---|---|
| No frame found | → DP(B) run /frame first or provide path |
| ∃ brainstorm (¬analysis) | Treat as no analysis — offer to promote via interview |
| ∃ analysis, user picks reuse | Present existing → jump to Step 3 |
| Expert subagent fails | Report error, continue without that reviewer |
| Tier S | Skip Shapes + Fit Check |
| Frame lacks appetite | Ask user during interview Phase 1 |
/frame (artifact: artifacts/frames/{N}-{slug}-frame.mdx)/spec/dev owns the dev-pipeline task lifecycle externally/dev: return control silently. ¬write summary. ¬ask user. ¬announce /spec. /dev re-scans and advances.Done. Next: /spec --issue N. Stop./dev presents Retry | Skip | Abort.$ARGUMENTS
npx claudepluginhub roxabi/roxabi-plugins --plugin dev-coreAnalyzes coding problems using Explore agent to scan codebase, identify core issues, define minimal scope, evaluate solution options, and outline implementation plans with output template.
Analyzes initial proposals by researching codebases and generating actionable implementation roadmaps with alternatives.
Autonomously researches feature requests or architecture documents, explores codebase patterns, identifies ambiguities and gaps, produces feature-context.md for orchestrator without making technical decisions.