Skip to content

divisor-entropy agent — structural delta enforcement #3

Description

@jflowers

Summary

Create a divisor-entropy.md agent that computes the structural delta between base and PR branches, enforcing the Boy Scout Rule ("leave the code better than you found it"). Deployed to consuming projects via vibe-check init.

RFC: https://github.com/orgs/unbound-force/discussions/483 — Group 2a
Phase: P1 (Enforcement)

Context

The Review Council currently has 9 divisor-* agents that are dynamically discovered. This adds a new entropy-focused divisor that ensures PRs do not degrade structural quality metrics. The agent is shipped as an embedded asset in the vibe-check binary and deployed via vibe-check init (analogous to gaze init).

Deployment

vibe-check init
  └── deploys .opencode/agents/divisor-entropy.md

The agent file lives in internal/scaffold/assets/agents/divisor-entropy.md within the vibe-check repo and is embedded via //go:embed.

Agent Design

divisor-entropy.md

  • Discovery: Auto-discovered by the Review Council (follows existing divisor-* naming convention)
  • Role: Computes structural quality delta between the base branch and the PR branch
  • Tooling: Calls vibe-check analyze on both base and PR branches to compute deltas

What It Measures

  • Package coupling changes (Ca, Ce, Instability delta)
  • New circular dependencies introduced
  • Cohesion changes (LCOM delta)
  • Overall structural entropy direction (improving / stable / degrading)

Verdict Logic

  • APPROVE: Structural metrics improve or remain stable
  • REQUEST CHANGES: PR introduces new circular deps, significantly increases instability, or degrades cohesion beyond threshold
  • COMMENT: Minor metric shifts that warrant discussion

Acceptance Criteria

  • divisor-entropy.md agent created in internal/scaffold/assets/agents/
  • Deployed to .opencode/agents/ via vibe-check init
  • Auto-discovered by Review Council (follows naming convention)
  • Calls vibe-check analyze (not gaze, not goda) on both branches
  • Computes structural delta between base and PR branches
  • Provides clear verdict (APPROVE / REQUEST CHANGES / COMMENT) with metric justification
  • Tested with sample PRs showing improvement and degradation

Dependencies

Activity

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

    P0Critical priority — Phase 1 foundation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions