Spring context di reasoning

From JetBrains/skills · View interactive version

Spring context di reasoning is an AI agent skill from the GitHub repository JetBrains/skills. Diagnose Spring application context startup failures, bean graph problems, missing or duplicate beans, circular dependencies, conditional auto-configuration mismatches, and profile-related wiring issues in Kotlin + Spring projects. Use when the app does not start, a bean is not created or is created

How to use this skill

Skill file

Spring Context DI Reasoning

Source mapping: Tier 1 critical skill derived from Kotlin_Spring_Developer_Pipeline.md (SK-02).

Mission

Reconstruct why the Spring container made a specific decision and propose the narrowest fix that restores correct wiring.

Assume the visible exception is often a wrapper, not the real cause.

Collect Evidence First

Reconstruct The Bean Path

Diagnose By Category

Check these categories in order:

  1. Missing bean:
  1. Ambiguous bean:
  1. Conditional mismatch:
  1. Configuration binding failure:
  1. Circular dependency:
  1. Auto-configuration collision:
  1. Lifecycle or initialization side effects:

Fix Hierarchy

Prefer fixes in this order:

  1. Correct the missing import, annotation, qualifier, or profile.
  2. Correct the configuration property source or binding model.
  3. Narrow the scan or import boundary to the intended package or module.
  4. Resolve ambiguity with @Qualifier or @Primary.
  5. Refactor an actual cycle into a cleaner dependency direction.
  6. Use @Lazy only as a deliberate escape hatch, and explain the tradeoff.

Advanced Container Traps

Expert Heuristics

Output Contract

Return these sections:

Guardrails

Common Spring-Specific Checks

Quality Bar

A good run of this skill explains why Spring made the wrong decision and gives a minimal, testable fix.

A bad run waves at annotations, suggests broad scans, or ignores the dependency chain that actually failed.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.