Agentic patterns

From markus41/claude · View interactive version

Agentic patterns is an AI agent skill from the GitHub repository markus41/claude. Patterns from \"Agentic Design Patterns\" (Gulli & Sauco, 2025) applied to AI-powered codebase upgrade intelligence

How to use this skill

Skill file

Agentic Design Patterns — Upgrade Suggestion

Patterns from "Agentic Design Patterns" (Gulli & Sauco, 2025) applied to AI-powered codebase upgrade intelligence

Applied Patterns

Reflection

Relevance: Upgrade analysis requires not just identifying what could change, but critiquing the quality of that analysis — an overly eager upgrade recommendation without considering migration cost is as harmful as missing a critical security fix.

Current Implementation: The plugin performs 8-dimension analysis (security, performance, DX, UX, architecture, code quality, innovation, tech debt) with each dimension producing evidence-based scores and rationale.

Enhancement: Apply self-critique reflection after the initial analysis pass — have a secondary reasoning step review each dimension's output for: (a) uncited claims, (b) upgrade recommendations that ignore breaking changes, (c) confidence scores inconsistent with evidence density. The refined output replaces the first-pass draft before surfacing to the user.

Multi-Agent (Council Pattern)

Relevance: A single model evaluating all 8 dimensions introduces bias — the model that finds a brilliant security fix may downplay performance regressions. Specialized agents reduce blind spots.

Current Implementation: A multi-agent council coordinates the analysis, with different agents handling distinct dimensions, orchestrated through the council review workflow.

Enhancement: Formalize the council pattern with structured dissent — each dimension agent produces an assessment AND a challenge brief that a devil's-advocate agent uses to stress-test the recommendation. The council chair synthesizes agreements, negotiates conflicts, and flags irresolvable disagreements for user review.

Parallelization

Relevance: 8-dimension analysis of a large codebase is time-consuming when run sequentially. Dimensions are largely independent and can proceed concurrently.

Current Implementation: Concurrent dimension analysis runs agent workstreams in parallel, dramatically reducing total analysis time.

Enhancement: Implement result streaming parallelization — completed dimensions surface immediately as they finish rather than waiting for the slowest dimension, giving the user progressive visibility into findings. A dependency layer ensures dimensions that inform others (security findings that affect architecture recommendations) complete in the right order.

Reasoning (Evidence-Based Scoring)

Relevance: An upgrade suggestion without traceable reasoning is untrustworthy — developers need to know why a library is flagged, not just that it is.

Current Implementation: The plugin produces evidence-based confidence scores backed by codebase fingerprinting, usage analysis, and framework-specific knowledge.

Enhancement: Apply chain-of-thought reasoning traces — each score surfaces the 3-5 evidence items that drove it, ranked by weight, so developers can challenge the reasoning and the system can be corrected without a full re-analysis.

Evaluation

Relevance: Upgrade intelligence is only as good as its accuracy. The system must evaluate its own recommendations against ground truth (past upgrades, known breaking changes, actual migration effort).

Current Implementation: Confidence scoring and tech debt forecasting quantify uncertainty. The impact preview feature shows before/after states.

Enhancement: Implement self-evaluation against a known-outcomes corpus — when the user acts on a suggestion (or explicitly rejects it with feedback), that outcome is stored and used to calibrate future confidence scores for similar patterns. This creates a learning loop that improves precision over time.

Planning (Upgrade Roadmaps)

Relevance: A list of upgrade suggestions without sequencing is a backlog, not a plan. Dependencies between upgrades (upgrade A before B; C and D can be batched) must be explicit.

Current Implementation: The plugin generates upgrade roadmaps with phased sequencing, batching compatible upgrades and separating high-risk changes.

Enhancement: Apply formal dependency-aware planning — model the upgrade space as a directed acyclic graph where edges represent compatibility dependencies. The roadmap planner finds the optimal topological ordering that minimizes re-work while maximizing parallelism within each phase.

Resource-Aware (Model Routing)

Relevance: Not all 8 dimensions require the same analytical depth. A routine patch-level version bump needs less reasoning than a major framework migration recommendation.

Current Implementation: Model routing selects analysis depth based on upgrade complexity and dimension criticality, using lightweight models for straightforward checks and deeper reasoning for complex architectural recommendations.

Enhancement: Apply dynamic resource allocation — the orchestrator monitors token usage per dimension in real time and reallocates budget from low-signal dimensions to high-signal ones. If security analysis is producing dense findings, it gets more tokens; if UX analysis finds nothing noteworthy, it exits early and cedes its budget.

Pattern Interaction Map

Parallelization ──────► Multi-Agent Council ──────► Reflection
       │                        │                        │
       │                        ▼                        │
       │                  Reasoning ◄────────────────────┘
       │                (Evidence Traces)
       │                        │
       ▼                        ▼
Resource-Aware ──────► Evaluation ──────────────► Planning
(Model Routing)    (Confidence + Calibration)   (Roadmaps)

Flow: Parallel dimension agents (Parallelization) run concurrently under budget control (Resource-Aware). Each agent produces evidence-traced reasoning (Reasoning) that feeds the council (Multi-Agent). The council applies self-critique (Reflection), yielding calibrated scores (Evaluation) that feed into sequenced roadmaps (Planning). User outcomes loop back to recalibrate future evaluations.

References

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.