Skip to content

feat: add deterministic boundary-quality eval for architecture plans (#316)#333

Merged
azalio merged 1 commit into
mainfrom
claude/compassionate-cerf-5tugql
Jul 5, 2026
Merged

feat: add deterministic boundary-quality eval for architecture plans (#316)#333
azalio merged 1 commit into
mainfrom
claude/compassionate-cerf-5tugql

Conversation

@azalio

@azalio azalio commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Implements #316 — adds a deterministic boundary_quality_report module that evaluates architectural decomposition plans for boundary quality. Works from blueprint.json data alone: no network, no model calls, no optional structural code-map (#310) required.

Changes

src/mapify_cli/boundary_quality_report.py (new module)

  • is_architecture_heavy(blueprint) — detects refactor+large or 3+ arch-concern subtasks
  • report_boundary_quality(blueprint) -> BoundaryQualityReport — runs all four advisory checks
  • BoundaryQualityReport.as_dict() — JSON-serializable output

Four advisory checks (warn/info only — hard errors stay in validate_blueprint_contract):

  • FILE_SHARED_ACROSS_BOUNDARIES (warn): same file in two unrelated subtasks — ownership ambiguous, concurrent writes will conflict
  • CROSS_BOUNDARY_DEP_PRESSURE (warn): high-risk/large subtasks share a directory prefix but have no declared dependency
  • REFACTOR_WITHOUT_TEST_PAIR (info): refactor subtask with no tests subtask that declares it as a dependency
  • LOW_COHESION_SUBTASK (info): affected_files span 3+ top-level directories for non-permissive concern types (suppressed for refactor/docs/release/config)

Related subtasks (dependency edge in either direction) suppress FILE_SHARED and CROSS_BOUNDARY warnings.

tests/test_boundary_quality_report.py (new, 33 tests)

  • VC1–VC3: architecture-heavy detection (True/False)
  • VC4–VC5: FILE_SHARED_ACROSS_BOUNDARIES (fires + suppressed by dep)
  • VC6–VC7: CROSS_BOUNDARY_DEP_PRESSURE (fires + suppressed by dep)
  • VC8–VC9: REFACTOR_WITHOUT_TEST_PAIR (fires + suppressed by test dep)
  • VC10–VC11: LOW_COHESION_SUBTASK (fires + suppressed for refactor/docs)
  • VC12: clean blueprint → zero findings
  • VC13: report contract (returns BoundaryQualityReport, summary dict, empty-blueprint safe)
  • VC14: as_dict() JSON-serialisable

Acceptance criteria

Test results

3342 passed, 4 skipped, 0 failures (full suite)
ruff: All checks passed
pyright: 0 errors, 0 warnings, 0 informations

Generated by Claude Code

…316)

Add src/mapify_cli/boundary_quality_report.py — a pure-Python advisory
evaluator that works from blueprint.json data alone (no network, no model
calls, no structural code-map required).

Checks
- FILE_SHARED_ACROSS_BOUNDARIES (warn): same file in two unrelated subtasks
- CROSS_BOUNDARY_DEP_PRESSURE (warn): high-risk/large subtasks share a
  directory prefix but have no declared dependency
- REFACTOR_WITHOUT_TEST_PAIR (info): refactor subtask with no tests subtask
  that depends on it
- LOW_COHESION_SUBTASK (info): affected_files span 3+ top-level directories
  for non-permissive concern types; suppressed for refactor/docs/release/config

Public API
- is_architecture_heavy(blueprint) -> bool
- report_boundary_quality(blueprint) -> BoundaryQualityReport
- BoundaryQualityReport.as_dict() -> JSON-serializable dict

All findings are warn/info (advisory only); hard errors remain in
validate_blueprint_contract. Related subtasks (dep edge in either
direction) suppress file-sharing and pressure warnings.

Tests: 33 tests in tests/test_boundary_quality_report.py covering VC1-VC14:
architecture-heavy detection, all four checks (positive + suppressed paths),
clean blueprint zero-findings, and JSON serialisability.
Full suite: 3342 passed / 0 failures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HZ3wHDow49xBGUwWFPH2mD
@azalio azalio merged commit 5bf92dc into main Jul 5, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@azalio, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 21 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2669b601-9972-4ca4-ba96-8221fc6e9a2a

📥 Commits

Reviewing files that changed from the base of the PR and between a22f496 and ad4199a.

📒 Files selected for processing (2)
  • src/mapify_cli/boundary_quality_report.py
  • tests/test_boundary_quality_report.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/compassionate-cerf-5tugql

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants