business-logic-extractor

Extract business logic and domain models into an llms.txt-style Markdown reference.

7|2|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/AndurilCode/craftwork --skill business-logic-extractor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: business-logic-extractor
Source: https://github.com/AndurilCode/craftwork/tree/main/skills/business-logic-extractor
Command: npx skills add https://github.com/AndurilCode/craftwork --skill business-logic-extractor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It eliminates the difficulty of understanding what a complex codebase actually does from the perspective of product behavior, validations, and domain rules.

Core Features & Use Cases

  • Domain surface scanning: Finds ORM models, validation/guard logic, service/use-case layers, tests, enums/types, config/thresholds, migrations, controllers/routes, and cross-cutting middleware where business meaning is encoded.
  • Structured domain model extraction: Converts entities into a domain reference with fields, relationships, lifecycle/states, and explicit invariants.
  • Business rule extraction into rule clusters: Documents eligibility, authorization, eligibility thresholds, calculations, side effects, and state transitions as plain-English conditions backed by annotated code and test assertions.

Quick Start

Ask the AI to extract the business logic from the current codebase into a single llms.txt-style Markdown reference that documents entities, invariants, and product rules.

Frequently Asked Questions about business-logic-extractor

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

FAQPage Schema
How do I extract business logic and domain rules from an existing codebase?

You can extract business logic by analyzing source code and tests to document entities, invariants, validations, and state transitions into a structured Markdown reference focused on product behavior rather than API calls.

What is the best way to document product behavior and domain models for onboarding?

The best way to document product behavior is generating an llms.txt-style reference that captures domain models, eligibility rules, and lifecycle transitions derived directly from the repository's source code and test assertions.

Can I reverse engineer system behavior and invariants from source code and tests?

Yes, you can reverse engineer system behavior by scanning ORM models, guard logic, service layers, and tests to identify explicit invariants, side effects, and state transitions encoded within the application.

How do I generate a codebase documentation reference for business rules and state transitions?

You generate a codebase documentation reference by performing a domain-first assembly into H2/H3 sections, clustering business rules like authorization thresholds and calculations into plain-English conditions backed by annotated code.

Does extracting domain models require filesystem access to the repository?

Yes, extracting domain models requires filesystem access to scan the codebase for cross-cutting middleware, config thresholds, migrations, and validation logic where business meaning is encoded.

What is the difference between documenting business logic and API documentation?

Documenting business logic focuses on what the system does, such as eligibility and side effects, whereas API documentation explains how to call endpoints, making a domain reference more suited for product behavior understanding.