Skip to content

Use case: architecture rules checked over history #28

Closed

Description

@adityamukho

Summary

Add a use case: architecture and layering rules written as Datalog, checked against the module graph at every commit.

The idea

Store the module or package dependency graph per commit. Write rules such as "UI code may not depend on the database layer, directly or through any chain." Tools like ArchUnit check this for one snapshot. With history, you can also see when a rule was first broken and how the graph drifted.

Questions it answers

  • Which forbidden dependency paths exist right now?
  • At which commit did each violation first appear?
  • How has coupling between two areas grown over the last year?

Why Minigraf fits

  • "Directly or through any chain" is reachability, which recursive rules handle well.
  • Valid time per commit gives the history without storing full copies of the graph by hand.

Suggested content

  • The idea, compared briefly with snapshot-only tools
  • A fact schema (module, depends-on, layer)
  • A recursive rule that finds forbidden paths
  • A query for the first commit where a violation appeared

Notes


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions