mayurpise/draft/deep-review

Claude Code and agent skill by mayurpise/draft

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Single-module production readiness audit (ACID, resilience, observability). Use to audit one service/module end-to-end — NOT for diff/PR review (use review / quick-review) or bug-finding sweeps (use bughunt).

Install

npx vskill@latest install mayurpise/draft/deep-review

SKILL.md

The same SKILL.md was published earlier as mayurpise/draft/deep-review.

Deep Review — Production-Grade Module Audit

Perform an exhaustive end-to-end lifecycle review of a service, component, or module. Ensure ACID compliance and production-grade enterprise quality. Unlike standard review commands, this operates strictly at the module level.

MANDATORY GRAPH LOOKUP (read before Phase 1)

When draft/graph/schema.yaml exists, this skill must follow the graph-first lookup contract in core/shared/graph-query.md §Mandatory Lookup Contract. Deep-review uses the graph to narrow review scope — a key 30–50% scope reduction:

First resolve the bundled helpers:

bash
# Locate Draft's bundled helpers (cwd is the user's project; ${CLAUDE_PLUGIN_ROOT}
# is not exported into skill Bash). See core/shared/tool-resolver.md.
DRAFT_TOOLS="${DRAFT_PLUGIN_ROOT:-$(cat ~/.cache/draft/plugin-root 2>/dev/null)}/scripts/tools"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/cache/*/draft/*/scripts/tools 2>/dev/null | sort -V | tail -1)"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/marketplaces/*draft*/scripts/tools 2>/dev/null | tail -1)"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$PWD/scripts/tools"
  1. Use "$DRAFT_TOOLS/graph-impact.sh"/graph-callers.sh and "$DRAFT_TOOLS/graph-arch.sh" --repo . for the audited module's structure — do not enumerate via find.
  2. Run "$DRAFT_TOOLS/graph-impact.sh" --repo . --file <each-changed-file> per file in the diff (or per file in the module if no diff) to obtain the affected module set deterministically.
  3. Run "$DRAFT_TOOLS/cycle-detect.sh" --repo . and flag any cycle that includes the audited module as Architecture Resilience finding.
  4. Run "$DRAFT_TOOLS/hotspot-rank.sh" --repo . to identify high-fanIn files inside the module — these get deeper inspection.

Filesystem grep is reserved for source-text scans (API contract strings, secret patterns, log message audits). Module enumeration and caller tracing go through the graph.

Red Flags - STOP if you're

See shared red flags — applies to all code-touching skills.

Skill-specific:

  • Acting without reading the Draft context (draft/.ai-context.md, draft/tech-stack.md, draft/product.md)
  • Modifying production code. This command is for auditing and reporting only. Fixes should be handled in a separate implementation track.
  • Reviewing a module that was already reviewed recently, unless explicitly requested.

Arguments

  • $ARGUMENTS — Optional: explicit module/service/component name (directory) to review. If omitted, auto-select the next unreviewed module.

Step 0: Verify Draft Context

bash
ls draft/.ai-context.md 2>/dev/null

If draft/ does not exist: STOP — "No Draft context found. Run /draft:init first. Deep review requires draft/.ai-context.md and draft/tech-stack.md to evaluate against project standards."

If .ai-context.md is missing, check for draft/architecture.md as a fallback (per core/shared/draft-context-loading.md).


Module Selection

  1. Check review history: Read draft/deep-review-history.json if it exists. This file tracks previously reviewed modules with timestamps.
  2. If `$ARGUMENTS` is provided: Use that module. If it was previously reviewed, re-review it (the user explicitly requested it).
  3. If no argument: Discover all modules using the following priority order:
  4. Use module definitions from draft/.ai-context.md if it exists (check ## Modules or ## Module Catalog sections).
  5. Use top-level directories under src/ or equivalent source root.
  6. Use directories containing __init__.py, package.json, or go.mod.

Document which heuristic was used in the report. Select the first module NOT present in the review history. If all have been reviewed, pick the one with the oldest review date.

  1. Announce selection: State which module was selected and why before proceeding.

Review Phases

Phase 1: Context & Structural Analysis
  • Load Draft context following the procedure in core/shared/draft-context-loading.md. Use loaded context to understand intended boundaries and critical invariants.
  • Load track HLD/LLD if any track owns this module. Scan draft/tracks/*/hld.md for §Detailed Design components matching the module path. When found, extract claims from §High-Level Design / Key Design Decisions, §Checklist (Performance/Scale/Security/Resiliency/Multi-tenancy/Upgrade/Cost), §Observability, §Deployment, and any LLD §Classes and Interfaces invariants and §Error Handling policies. These claims become the design contract this audit measures against (HLD claims vs code reality).
  • Load Learned Anti-Patterns — If draft/guardrails.md exists, read the ## Learned Anti-Patterns section before analysis begins. During the audit, when an issue matches a learned anti-pattern, prefix the finding with [KNOWN-ANTI-PATTERN: {pattern name}]. This separates newly discovered issues from documented recurring patterns and allows the report to recommend systemic remediation rather than isolated fixes.
  • Map the module's full dependency graph (imports, injected services, external calls)
  • Trace the complete lifecycle: initialization → processing → persistence → cleanup
  • Identify all entry points and exit paths
  • Catalog all state mutations and side effects
  • API Contract Drift Detection: Compare the module's actual code interfaces against documented contracts (OpenAPI/Swagger specs, Protobuf/gRPC definitions, GraphQL schema files, TypeScript type exports). Flag drift: endpoints that exist in code but not in the spec (or vice versa). Flag type mismatches between spec and implementation. Reference: Amazon, Google large-scale changes.
Phase 2: ACID Compliance Audit
Rule references: [CQ-006, CQ-007, CQ-008] error/exception context, [SEC-03] SQL parameterization, [RC-004, RC-005] data integrity & concurrency. Cite the rule ID in each finding.

Every ACID finding ("missing rollback", "fire-and-forget write", "race condition", "no isolation guarantee") must cite the closest applicable rule range (e.g., [RC-004..RC-005] for data integrity, [CQ-006..CQ-008] for error context, [SEC-03] for SQL safety).

Evidence requirement (Ground-Truth Discipline G1, G4): Every ACID finding ("missing rollback", "fire-and-forget write", "race condition", "no isolation guarantee") must cite file:line AND include a quoted code snippet showing the issue. A finding that says "no transactions found in module X" without quoting the code site is a graph-metadata claim, not an audit result — discard it. "Verify" and "Check" below mean Read the candidate sites, not "scan for keywords."

  • Atomicity: Verify all multi-step operations are wrapped in transactions. Partial failure must not leave corrupt state. Check for missing rollback paths. [RC-004]
  • Consistency: Validate all invariants, constraints, and business rules are enforced before and after every state transition. Check schema validation, data type enforcement, and boundary conditions. [CQ-006, RC-003]
  • Isolation: Check for race conditions, shared mutable state, concurrent access without locking/synchronization. Verify transaction isolation levels where databases are involved. [RC-005]
  • Durability: Confirm committed data survives crashes. Check for fire-and-forget patterns, missing flush/sync calls, and inadequate error handling around persistence. [CQ-007, CQ-008]
  • Event Sourcing: Are events immutable? Is event replay idempotent? Is the event store append-only?
  • CQRS: Are read/write models eventually consistent? Is consistency lag acceptable for the use case?
  • Saga Pattern: Are compensating transactions defined for each step? What happens on partial saga failure?
  • Eventual Consistency: Are there convergence guarantees? How is conflict resolution handled (LWW, CRDT, manual)? Reference: Amazon distributed systems.
Phase 3: Production-Grade Assessment

Applicability note: Skip categories that are not applicable to the module type (e.g., circuit breakers and backpressure are backend-specific; skip for frontend/CLI modules).

Rule references: [RC-008, RC-009, RC-010] observability & logging, [SEC-04, SEC-06] network/process boundaries, [SEC-05] secrets, [RC-015] config validation, [CQ-006..CQ-008] error context. Cite the rule ID in each finding.

Every finding in this phase must cite the relevant rule range (e.g., [RC-008..RC-010] for observability, [SEC-04, SEC-06] for network/process boundaries, [RC-015] for configuration).

  • Resilience: Graceful degradation, circuit breakers, timeout handling, backpressure [RC-005]
  • Observability: Logging coverage (not excessive), structured log fields, correlation IDs, metric emission points [RC-008, RC-009, RC-010]
  • Structured logging: Are logs structured (JSON/key-value) vs free-form strings?
  • Log level correctness: Are ERROR/WARN/INFO/DEBUG used appropriately? Are expected conditions logged at DEBUG, not ERROR?
  • PII leakage: Do logs or error messages expose personally identifiable information, tokens, or credentials? [SEC-05, RC-010]
  • Tracing spans: Are spans created at service boundaries? Do spans include relevant attributes (user_id, request_id)?
  • Metric cardinality: Are metric labels bounded? Unbounded labels (e.g., user_id as label) cause metric explosion.
  • Alerting coverage: Are critical failure modes covered by alerts? Are there runbooks linked to alerts?
  • Reference: Netflix Full Cycle Developers, Google SRE.
  • Configuration: Hardcoded values that should be configurable, missing environment variable validation [RC-015, SEC-05]
  • State Lifecycle: Memory accumulation, zombie processes, dropped messages
  • SLO/SLA Alignment:
  • Does the module's observed/expected error rate match defined SLOs?
  • Latency profiles: Are p50, p95, p99 latency targets defined and achievable?
  • Error budget: What percentage of the error budget has been consumed? Is the module in "protect" or "innovate" mode?
  • Availability: Does the module's uptime target (99.9%, 99.99%) match its actual architecture?
  • If no SLOs are defined, recommend defining them. Reference: Google SRE (<https://sre.google/sre-book/service-level-objectives/>).
  • Database Schema Analysis:
  • Missing indexes: Queries filtering/joining on unindexed columns.
  • Wide table scans: SELECT * or queries without WHERE clauses on large tables.
  • Schema constraints: Missing NOT NULL, UNIQUE, FOREIGN KEY constraints.
  • Migration safety: Can migrations run without downtime? Are they backward-compatible?
  • N+1 at schema level: Relationships that require multiple queries instead of joins.
  • Reference: Google large-scale changes.
Phase 3.5: HLD/LLD Claims vs Code Reality (when HLD found in Phase 1)
Rule references: [RC-012] API/contract drift, [SEC-01..SEC-10] for §Security claims, [RC-005, RC-013] for §Resiliency/§Architecture claims. Cite the rule ID alongside [HLD-DRIFT: §<section>].

Cite the most specific rule range applicable to the drift (e.g., [RC-012] for API changes, [SEC-01..SEC-10] for security claims).

For each HLD claim extracted in Phase 1, validate it against code:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
39
Repository forks
5
7-day trend score
18

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mayurpise/draft/deep-review/badge)](https://verified-skill.com/skills/mayurpise/draft/deep-review)

Something wrong with this skill or its page? Tell us.