convention-graph-discovery

Maps repository conventions into a provenance-tracked graph of domains, extractors, and consumers.

2.9k|733|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/zts212653/clowder-ai --skill convention-graph-discovery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convention-graph-discovery
Source: https://github.com/zts212653/clowder-ai/tree/main/cat-cafe-skills/convention-graph-discovery
Command: npx skills add https://github.com/zts212653/clowder-ai --skill convention-graph-discovery

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When entering an unfamiliar repository, LSP and grep only reveal symbol-level and text-level relationships, leaving convention-layer connections (MCP tools, skill manifests, API routes, workflow callbacks) invisible. This Skill provides a methodology to discover repo-specific conventions and build a queryable graph that answers "what breaks if I change X" with freshness and provenance tracking.

Core Features & Use Cases

  • Discovery Protocol: A seven-step workflow covering boundary definition, explicit anchor identification, domain definition, extractor TDD, engine integration, baseline comparison, and gap reporting.
  • Convention Graph CLI: Commands like pnpm convention-graph:index and pnpm convention-graph:code-consumers to index a repo and query consumers of MCP tools, skill manifests, or FastAPI routes with freshness status.
  • Quality Gates: Every edge carries provenance (extractor, version, source file, line, confidence), and queries report stale state when indexed files change, preventing blind edits on outdated graphs.
  • Use Case: Before renaming an MCP tool, run the code-consumers query to find all convention-layer consumers, verify freshness, and compare against grep/LSP results to catch missed references.

Quick Start

Ask the AI to map the convention graph of the current repository and find all consumers of a specific MCP tool before modifying it.

Frequently Asked Questions about convention-graph-discovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find all consumers of an MCP tool before renaming it?

Run the convention-graph code-consumers query with the mcp-tool domain, kind mcp_tool, and the tool name. The JSON output lists targets, consumers, per-edge provenance, and freshness so you can see every convention-layer reference before editing.

What is a convention graph compared to LSP or grep?

A convention graph maps repo-specific rules like tool registrations, manifest triggers, and route declarations, which LSP symbol resolution and grep text search miss. Each edge carries source span provenance, freshness state, and gap reporting for unrecognized patterns.

How do I add a new convention domain to the graph engine?

Define a domain plugin with domainId, node kinds, edge kinds, extractor inputs, invalidation scope, and negative fixtures, then write the extractor with minimal TDD fixtures. Register it with the same CLI and engine instead of writing ad-hoc query scripts.

Why does the convention graph query report stale results?

Queries compare the recorded index commit and file hashes against pending changes; any modified indexed file marks results stale. Re-run the index command before relying on the output for impact analysis.

When should I not use convention graph discovery?

Skip it for ordinary function calls already resolved by LSP, for document or history lookup, or when you only want to hardcode one repo's extractors elsewhere. It targets convention-layer relationships, not general symbol navigation.