Code audit
Implementation unification
Enji Guard finds rules kept in several places and shows where shared code makes changes safer.
What did the latest unification audit find?
Connecting to Enji Guard via MCP…
Reading the latest unification audit…
Worked 4 s · Enji Guard via MCP ›
Score 79/100 — healthy. 2 findings:
- High riskWeb and app checkout disagree on order totals
- Medium riskBundle editor skips the catalog size limit
Merge the duplicate logic.
Moving both rules to shared code…
Running tests for both paths…
Worked 52 s ›
Done. Both rules now live in one place:
- Both checkouts use one order total calculation
- Bundle editor calls the catalog validator
Tests pass on both paths. Ready for review.
What the audit checks
Six criteria, from equivalent tasks to the value of merging.
Equivalent capabilities
Where components solve the same task with separately maintained logic.
Shared rules and variants
Which inputs, results and errors are shared, and when they differ.
Boundary for shared logic
Where one implementation can own a rule and retain real differences.
Reuse by callers
Which callers share the rule and where they still maintain their own.
Ownership of shared logic
Which component should own the rule, given its state and dependencies.
Value of consolidation
Do fewer edits and inconsistencies justify migration and checks?
Shared and independent logic
What a report can find at each step
Components and callers
Map what each component does and who calls it.
Rules and exceptions
Compare inputs, outcomes, failures and legitimate variations.
Independent paths
Trace separate implementations and confirm where results diverge.
Existing reuse
Check which callers reuse an existing owner and which bypass it.
Owner and trade-offs
Compare shared ownership with keeping separate implementations.
What's in the report
- A 0–100 score
- Where rules diverge and what can be shared
- Scope — what was checked and what wasn't
What the audit is not
- Does not change source or call live services
- Does not flag similar code on its own
- Does not recommend merging code with distinct rules
Connect a repository
GitHub or GitLab. The audit doesn't change your code.
Enji Guard