Db orchestrator

From Hainrixz/claude-db · View interactive version

Db orchestrator is an AI agent skill from the GitHub repository Hainrixz/claude-db. Orchestrates a full database audit — detects the stack(s), dispatches read-only auditor subagents in parallel by paradigm, merges and dedupes their findings, computes the two never-blended scores (Design & Integrity + Performance & Scale) via score.mjs, and renders the report. Invoked by the audit c

How to use this skill

Skill file

<!-- Copyright (c) 2026 Enrique Rocha (@soyenriquerocha) · tododeia.com · id er-f37b7121 -->

db-orchestrator (Layer 2)

Coordinates the whole audit. Three phases: detect → dispatch → synthesize. Two scores, never blended.

1. Detect

  1. Resolve the target (project dir, or a plain-language description).
  2. Run stack-detect (wraps scripts/detect-stack.mjs). Get the stacks array, each with paradigm, engine, orm, platform, source_of_truth, confidence.
  3. Empty result → route to /claude-db:start (wizard) or description mode. Never guess an engine.
  4. If the user opted into Tier-1, run introspect (read-only) so runtime-dependent checks can reach established; otherwise those checks will return needs_api.

2. Dispatch (parallel, read-only)

For each stack, spawn the read-only auditor subagents in parallel — one message with multiple Task calls — so their verbose intermediate output stays isolated. (context: fork is NOT a Task parameter; parallelism is achieved by issuing several Task calls in a single message.) Pass each the source_of_truth location/contents, the paradigm, the engine/platform, and its assigned modules. Auditors of an inactive paradigm are not dispatched (their modules emit no findings and leave the denominator):

Each subagent returns a JSON array of findings conforming to schema/finding.schema.json. Auditors are read-only (tools Read, Grep, Glob, Bash, WebFetch only) — the audit can never mutate files. M19/M20 findings keep their module id for provenance but inherit the natural module's category at scoring time.

3. Synthesize

  1. Merge all findings; dedupe by id (keep the most severe status: fail > warn > needs_api > pass > not_applicable).
  2. Score per stack with the matching paradigm:

```bash

node scripts/score.mjs --findings <merged.json> --paradigm <paradigm>

```

Multi-store → score each stack, then roll up worst-of-across-stores per axis (design = min over stores, same for performance); name the flooring store (e.g. "Design 58 — floored by redis-cache").

  1. Render the report (bands/interpretations from references/scoring-model.md):

Plain-language layer (novice-friendly)

Alongside the technical report, give a short plain-language summary: what the two scores mean in one sentence each ("your design is solid but it won't hold load yet"), the top 3 things to fix first in non-jargon terms, and what needs_api means ("I'd need a read-only connection to confirm these"). Keep the expert detail; add the human translation — never replace one with the other.

Notes

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.