Skip to content

[FEATURE] Rule metadata: .because() and .as() #76

Description

@LukasNiessen

In short

Attach a human reason to a rule so that when it fails the error explains WHY it exists ('the domain must stay framework-free'), not just 'rule violated.'

Problem

Architecture rules encode decisions; capturing WHY in the rule and echoing it in the failure message turns the test suite into living governance documentation and makes failures self-explanatory to newcomers.

Proposal

Let a rule carry a human rationale and a display name that surface in the failure output: rule.as('Domain purity').because('the domain must stay framework-free').

Acceptance criteria

  • A failing rule's message includes its as() name and because() reason.
  • Both are optional and backward-compatible.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions