# Enforce an agreed layering rule with a lint rule

A layering rule everybody agrees on and nothing enforces, encoded as a rule with the violations cleared.

Category: Architecture and boundaries
Source: https://letsship.ai/use-cases/enforce-a-layering-rule
Published: 2026-08-25

## Goal

Encode an agreed layering rule as a lint rule and clear the existing violations.

## Acceptance criteria

- The rule is configured and runs in the pipeline
- A deliberately seeded violation fails the check
- Existing violations are fixed rather than allowlisted
- Any allowlist entry carries a reason and an owner

## What lands as proof

A seeded violation failing the check, which is the difference between a documented rule and an enforced one.

## Prompt

Copy this to an agent to open the ticket:

```text
Create a Linear issue in my team and assign it to the SHIP agent.

Title: Enforce the {rule} layering rule

Description: Encode an agreed layering rule as a lint rule and clear the existing violations.

Acceptance criteria:
- The rule is configured and runs in the pipeline
- A deliberately seeded violation fails the check
- Existing violations are fixed rather than allowlisted
- Any allowlist entry carries a reason and an owner

Before you create the issue, find a layering convention this repository documents but does not enforce and replace {rule} with it.
```

## Questions

### What does the agent actually change?

The ticket is scoped to one outcome: encode an agreed layering rule as a lint rule and clear the existing violations. Work that serves that outcome is in scope, and anything outside it is left for a separate ticket, so the pull request stays reviewable.

### How do I know the work is done?

The pull request carries the evidence, not only the diff. Here that means the rule fails on a deliberately seeded violation, so a reviewer can confirm the result without reproducing the work locally.

### How much oversight does this need?

The run stops once the plan is written. Somebody reads the approach and approves it before any code exists, which is the cheapest moment to redirect the work.
