LEDGERMACHINE

LM-COMPONENT-001

Find duplicate frontend components

Several definitions share a component name or a page-local implementation overlaps a shared component role.

What Ledgermachine reports

More than one component may own the same role

Decision, not automatic repair

Reuse the shared owner when the behavior is the same; preserve separate domain components when their responsibilities differ.

Source example

What this finding can look like

The exact candidate comes from the project’s own tokens and repeated values. This example shows the shape of the issue, not a universal replacement.

Flagged source
components/Button.tsx
features/checkout/Button.tsx
One possible resolution
import { Button } from "@/components/Button";

<Button variant="checkout" />

Resolution workflow

Fix the source without erasing intent

  1. Inspect

    Review every reported occurrence and the established candidates Ledgermachine found in the same project.

  2. Decide

    Reuse the shared owner when the behavior is the same; preserve separate domain components when their responsibilities differ.

  3. Verify

    Make the change in your editor or coding agent, then rescan. Ledgermachine stays read-only and records whether the finding cleared.

Run it on your source

See the evidence behind this rule.

Open a folder locally, inspect the exact occurrences, and decide whether to repair or preserve the difference.

Open Ledgermachine