business-logic-map

business-logic-map is a command for Claude Code from sigistry/marketplace. It costs 15 tokens per session (2,635 once invoked), scanned A, original, MIT.

A codebase analysis command that extracts business rules, validations, calculations, and workflows from source code, then explains them in ordinary business language.

In plain words
What is it for?
Use it to map entities, service logic, validation rules, formulas, state changes, and the way business processes interact.
Why use it?
It makes the behaviour of an old or unfamiliar system easier to understand before changing it.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the legacy-analyzer plugin — 5 commands shipped together

Good fit Use it to map entities, service logic, validation rules, formulas, state changes, and the way business processes interact.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/sigistry/marketplace/business-logic-map
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/sigistry/marketplace

Made for: Claude Code.

Or install legacy-analyzer, the plugin that ships this one along with the rest of its 5 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for business-logic-map

README.md
[![agentmods](https://agentmods.dev/badge/commands/sigistry/marketplace/business-logic-map/github.svg)](https://agentmods.dev/commands/sigistry/marketplace/business-logic-map)
Your own site
<a href="https://agentmods.dev/commands/sigistry/marketplace/business-logic-map"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/business-logic-map/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for business-logic-map

Your own site · 80×15
<a href="https://agentmods.dev/commands/sigistry/marketplace/business-logic-map"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/business-logic-map.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,635 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.02635
Opus 5 $0.00008 $0.01318
Sonnet 5 $0.00003 $0.00527
Haiku 4.5 $0.00002 $0.00264

Measured 6d ago against content hash a253011fc93f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

business-logic-map scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/legacy-analyzer/commands/business-logic-map.md · 427 lines

How it starts

The opening of the file, as written. The whole thing — 427 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Business Logic Mapping Command

You are tasked with extracting and understanding the business logic embedded in a legacy codebase. This command helps developers understand what the system does, why it does it, and how different business rules interact.

Objective

Create a comprehensive map of all business logic, rules, validations, calculations, and workflows in the codebase, explaining them in plain business language.

Step 1: Codebase Discovery

Initial Scan

  • Identify the project structure and entry points
  • Detect the technology stack, framework, and architecture pattern
  • Find configuration files that reveal business domains (routes, models, schemas)
  • Locate key directories: controllers, services, models, handlers, business logic layers

Key Files to Prioritize

  • API endpoints and route definitions
  • Service layer implementations
  • Business rule engines
  • Validation logic
  • Calculation and formula implementations
  • State machines and workflow engines
  • Database models and schema definitions

Step 2: Business Domain Identification

Analyze the codebase to identify distinct business domains:

Domain Discovery

  • Entities: What core business objects exist? (Users, Orders, Payments, Inventory, etc.)
  • Relationships: How do entities relate to each other?
  • Bounded Contexts: What are the logical divisions of business functionality?
  • Modules/Features: What capabilities does the system provide?

Output Format

## Business Domains Identified

### Domain: [Name]
**Purpose**: [What business problem this domain solves]
**Key Entities**: [List of main entities]
**Core Responsibilities**: [What this domain handles]
**Files/Directories**: [Where this logic lives]

Step 3: Business Rules Extraction

Extract all business rules, constraints, and validations:

Types of Rules to Identify

1. Validation Rules

  • Input validation (format, length, type)
  • Business constraints (age limits, quantity limits)
  • Cross-field validations
  • State validations (can only do X when in state Y)

Read the full file on GitHub · 427 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 427 lines · 15 tokens per session scan A a253011fc93f

Subscribe to this mod's changes

business-logic-map is a command published in the GitHub repository sigistry/marketplace (3 stars, last pushed 5d ago), licensed MIT. It adds 15 tokens to every session and 2,635 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.