understand-domain

Extract business domains and flows from a codebase into an interactive domain graph.

Updated Aug 26, 2026
One-click install
npx skills add https://github.com/danieliudi/trackforge-os --skill understand-domain-danieliudi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: understand-domain
Source: https://github.com/danieliudi/trackforge-os/tree/main/.cursor/skills/understand-domain
Command: npx skills add https://github.com/danieliudi/trackforge-os --skill understand-domain-danieliudi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Understanding the business logic buried in an unfamiliar codebase requires hours of manual file reading. This Skill automates that discovery by scanning the project, identifying domains, business flows, and process steps, and rendering them as an interactive horizontal flow graph in a dashboard. ## Core Features & Use Cases - Dual extraction paths: Derives domain knowledge from an existing knowledge graph (cheap, no file scanning) or performs a lightweight standalone scan with entry-point detection when no graph exists. - Entry point detection: The bundled Python scanner finds HTTP routes, CLI commands, event handlers, cron jobs, and GraphQL resolvers across many languages, then packages file signatures and metadata into a compact JSON context. - Freshness validation: Compares the existing graph's git commit against HEAD and warns when project files have drifted, so stale domain data is flagged before use. - Use Case: Onboarding onto a large monorepo — run the command to get a visual map of business domains and flows, then explore each flow in the auto-launched dashboard instead of reading hundreds of source files. ## Quick Start Ask the AI to run /understand-domain on the current project to extract its business domains and open the interactive flow graph.

Frequently Asked Questions about understand-domain

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

FAQPage Schema
How do I extract business domains from an existing codebase?

Run the /understand-domain command in the project root. It either derives domains from an existing knowledge graph or performs a lightweight scan of the file tree, entry points, and file signatures, then saves the result as a domain graph JSON.

What entry points does the domain scanner detect?

The scanner detects HTTP routes (Express, Flask, FastAPI, Next.js), CLI commands, event listeners and subscribers, cron schedules, GraphQL resolvers, gRPC services, and exported handler functions across many source languages.

Does understand-domain work without a knowledge graph?

Yes. When no knowledge-graph.json exists, it runs a lightweight standalone scan using the bundled Python script to build domain context from the file tree, entry points, and project metadata. Use --full to force a fresh scan.

How does it handle stale knowledge graphs?

It compares the graph's recorded git commit against HEAD using project-scoped diffs, including staged, unstaged, and untracked files. If project files changed, it warns that extraction may omit those changes and suggests refreshing the graph.

What happens when running inside a git worktree?

The skill detects worktrees by comparing git-dir and git-common-dir, then redirects output to the main repository root so the domain graph survives the ephemeral worktree session. Set UNDERSTAND_NO_WORKTREE_REDIRECT=1 to opt out.