skills/search/SKILL.md
Code-intelligence search over wicked-brain's unified static + injected code-relationship graph (ADR 0004). One skill, six routed actions: index (build/refresh the semantic + structural layers), blast-radius (impact analysis over dependents), lineage (data/dependency flow), hotspots (most-referenced symbols), service-map (service architecture from infra + code), and narrate (codebase orientation walkthrough). Use when: "index the codebase" / "build or refresh the code-intelligence index"; "what would break if I change X" / "blast radius of" / "impact analysis"; "trace lineage" / "where does this flow from/to" / "upstream or downstream of a symbol"; "most-referenced symbols" / "find god objects" / "coupling hotspots"; "map the services" / "service dependency map" / "visualize the service architecture"; "architecture walkthrough" / "narrate this codebase". Replaces the former /wicked-garden:search:* commands (index, blast-radius, lineage, hotspots, service-map). NOT for general code/concept search — use wicked-brain:search or wicked-brain:query directly.
npx skillsauth add mikeparcewski/wicked-garden wicked-garden-searchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
All actions delegate to wicked-brain, which owns the unified static +
injected code-relationship graph as of ADR 0004. Garden no longer maintains
its own graph; it consumes brain's. Garden contributes its proprietary
archetype edges to brain's graph via the drop-in extractor
.codegraph-extractors/archetype.mjs (discovered by brain's registry).
| Action | Answers | Where |
|--------|---------|-------|
| index | build/refresh the code-intelligence index | § Index / freshness |
| blast-radius | "what breaks if I change X?" (dependents) | § Blast radius |
| lineage | "where does this flow from / to?" (data flow) | § Lineage |
| hotspots | most-referenced symbols, god-objects | refs/hotspots.md |
| service-map | service architecture from infra + code | refs/service-map.md |
| narrate | codebase orientation / architecture walkthrough | codebase-narrator/SKILL.md |
Two code-intelligence layers, both living in wicked-brain (ADR 0004):
wicked-brain:search/query.wicked-brain:graph
(blast-radius/lineage) and the wicked-patch family.Semantic layer — invoke /wicked-brain:ingest with <path> (the brain
server's --source repo; incremental — only changed files re-ingest).
Structural layer — one call rebuilds the codegraph static graph and
re-applies every injected-edge extractor (built-in bus/dispatch/capability +
any per-repo drop-ins under .codegraph-extractors/):
npx -y wicked-brain-call graph-index
This replaces the old codegraph index + inject_all.py two-step — brain
runs the build and the extractors in a single pass, so the injected layer is
never left empty after a re-index. The result reports per-extractor counts,
total_injected_edges, and a staleness stamp.
Verify:
npx -y wicked-brain-call stats # brain chunk/tag counts (semantic layer)
and confirm graph-index reported total_injected_edges > 0 on a repo with wiring.
Notes
graph-* results
carry commits_behind/indexed_at; re-run graph-index when stale.graph-* returns
engine:"unavailable" — install @colbymchenry/codegraph or set
WICKED_CODEGRAPH_BIN.Resolve the symbol to a graph node id. Node ids are file:<relpath> for
files, or function:<hash> etc. for symbols. For a file, use file:<path>
directly. For a named symbol, find its id via brain:
npx -y wicked-brain-call symbols --query "<symbol>" # or wicked-brain:lsp workspace-symbols
Fallbacks (in order):
graph-* call returns engine: "unavailable", codegraph isn't
installed where brain runs — install it (npx @colbymchenry/codegraph) or
set WICKED_CODEGRAPH_BIN, then re-run graph-index.wicked-brain:search for semantic
neighbors, then Grep/Glob for literal refs — and flag that injected
relationships will be MISSING from the result (injected/string-keyed
links are invisible to grep).Analyze what would be affected if you changed a symbol — traces dependents (what uses this) over the code-relationship graph, including injected edges (bus/dispatch/capability/archetype) that grep and a static call-graph cannot see.
Scope:
blast-radiusanswers "what breaks if I change X?" (the dependents graph). For data-flow tracing (UI field → DB column or reverse), use thelineageaction.
Arguments: symbol (required — a file node like src/app.py, or a symbol
name); --depth (optional traversal depth; brain default applies if omitted).
npx -y wicked-brain-call graph-index.
The result carries a staleness stamp; if stale is true after editing, re-run it.npx -y wicked-brain-call graph-blast-radius --node "file:<path-or-resolved-id>"
The dependents array includes relationships grep can't see: a command that
dispatches an agent (injected:dispatch), a consumer that subscribes to
an event (injected:bus), an agent that declares a capability
(injected:capability) — and archetype→playbook relationships via garden's
.codegraph-extractors/archetype.mjs (injected:archetype). Each result
carries a staleness stamp.Examples
blast-radius scripts/_bus.py
blast-radius UserService --depth 3
Trace flow through the code-relationship graph. Downstream = what the symbol depends on; upstream = what depends on it. Includes injected edges (bus/dispatch/capability/archetype) that grep and a static call-graph can't see.
Scope:
lineageanswers "where does this flow from / to?". For pure "what breaks if I change X?" use theblast-radiusaction.
Arguments: symbol (required — file:<relpath> or a resolved node id);
--direction (optional, default downstream): downstream (dependencies),
upstream (dependents), or both; --depth (optional traversal depth;
brain default applies if omitted).
npx -y wicked-brain-call graph-index.npx -y wicked-brain-call graph-lineage --node "<id>" → dependencies.npx -y wicked-brain-call graph-blast-radius --node "<id>" → dependents.injected:bus, an archetype via injected:archetype) and a staleness stamp.Examples
lineage file:scripts/_bus.py --direction upstream
lineage User.email --direction both
Rank symbols by incoming reference count to expose god-objects, coupling
hotspots, and high-impact refactor targets. Reads the graph DB brain builds
(.codegraph/codegraph.db), with a brain-search fallback.
→ Full procedure: refs/hotspots.md
Detect services and their connections from infrastructure config (docker-compose/k8s/helm) plus brain/code patterns; report as table, json, or mermaid. → Full procedure: refs/service-map.md
For "give me an architecture walkthrough" / "narrate this codebase" / "where should I start reading", use the nested skill: codebase-narrator/SKILL.md — produces a guided reading order, annotated directory map, data-flow diagram, and gotchas list.
development
Pattern-conformance agent-half: evaluates a produced artifact or diff against a set of architectural/design pattern rules from the conformance-rule store (wicked_governance schema). Returns structured findings with rule ID, severity, and rationale — the deterministic half (mechanical rule recall) is done by the guard pipeline; this is the semantic evaluation step. Triggered by: the guard_pipeline `outgov_pattern` check (session-close), or explicitly by an engineering review when WICKED_OUTGOV_RULES_DIR is populated. NOT a replacement for the full `engineering` review skill — focuses only on conformance to stored Pattern rules; architecture and code-quality checks live in the `engineering` skill. Semantic evaluation reuses `wicked-garden-qe-semantic-reviewer` as the designated agent-half evaluator (per garden#983 spec). This skill is the orchestrating wrapper that loads applicable Pattern rules and delegates the per-rule semantic judgment to qe-semantic-reviewer.
tools
The FOUNDATIONAL domain-model capability: extract a codebase's domain — testable business rules (with confidence + provenance), entities, requirements — as a schema-conformant model on the estate graph. The workers annotate the store; wicked-core reads it and builds the requirements graph, coverage-gating fail-closed. Steers three fork workers. A shared substrate, not a modernization tool. The `modernize` archetype DERIVES from it; build / migrate / review / specify / explore consume the SAME domain model — none OWN it. Understanding a codebase's domain is upstream of almost everything else garden does. Use when: "extract the business rules / domain model from this codebase", "build a requirements graph from the code", "what does this system actually require", "reverse-engineer the domain before we build/port/migrate". Works on ANY codebase (modern or legacy) — the value is the domain model, not the porting. NOT the code transform itself (that is the archetype consuming this model). This skill produces the DOMAIN MODEL, not new code.
development
Domain-graph fork worker for the modernize archetype. Groups the estate's Louvain communities into business domains, attaches each requirement to its cluster (advisory cluster_id provenance), and invokes wicked-core's domain-graph build (which reads the annotated estate store, recomputes coverage fail-closed, and builds the requirements graph) — then validates core's output against the vendored schema. Use when: dispatched by wicked-garden-domain after rule extraction to turn a flat rule set into cluster-keyed domains; "group these into domains", "build the requirements graph", "translate clusters into a domain model". NOT for mining the rules themselves (that is domain-extractor) or threat-modeling (that is domain-coverage).
tools
Rule-extraction fork worker for the FOUNDATIONAL domain-model capability. Mines testable business rules from a codebase — each with a numeric confidence and a provenance{source, ref, source_kinds} — and annotates them into the estate store so wicked-core can build the domain-model requirements graph (coverage-gated). This is a substrate, not a modernization tool: the `modernize` archetype DERIVES from it, and build / migrate / review / specify / explore can consume the same domain model — none OWN it. Use when: dispatched by wicked-garden-domain to mine the business_rules of a codebase (or a module); "extract the domain rules", "what does this system require", building the requirements half of a domain model. NOT for grouping into domains (that is domain-modeler) or judging coverage (that is domain-coverage — a seat-distinct evaluator).