Skip to content

feat(core): rule edge/near-alignment #27

Description

@aram-devdocs

Summary

Cluster edges within alignment.tolerance_px (default 3) and
flag elements off by 0 < delta ≤ tolerance — the "almost but
not quite aligned" case.

Crate / area

plumb-core — rule engine, types, determinism (no internal deps)

Phase / batch

Part of #20 → Batch 2B (Remaining MVP rules (5 parallel implementations)).

Effort: M

PRD references

  • PRD §11.2
  • PRD §11.3

Acceptance criteria

  • Edge clustering algorithm documented + tested.
  • Rule emits violation for near-miss alignments, ignores pixel-perfect and unrelated edges.
  • Golden test + docs + register_builtin.

Dependencies

  • None (first in batch; batch-level deps gate this).

Review gates

  • 02-spec-reviewer
  • 03-code-quality-reviewer
  • 05-architecture-validator
  • 04-test-runner

How to deliver

Dispatch /gh-issue <this-issue-number>. See the root AGENTS.md and the scoped plumb-core/AGENTS.md for the invariants that apply.

Suggested delivery: gh-issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreplumb-core crate — rule engine, types, determinismkind:featNew capabilityphase-2V0 Phase 2 — MVP rule set + token adapters

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions