Skip to content

Add a contract-first /hygiene/ view to Repository Intelligence #75

Description

@szmyty

Outcome

Add a dedicated /hygiene/ view to Repository Intelligence that answers one narrow question clearly:

Which versioned Ego Hygiene contracts apply to this repository, and what is the current evidence-backed adoption/conformance state of each one?

This view complements—not replaces—Relay's broader /health/ view from #29 and Observatory's fleet-wide Hygiene conformance dashboard in egohygiene/observatory#5.

/health/ remains broad operational posture. /hygiene/ is the explicit contract matrix.

Architecture

Hygiene contracts + repository profile/applicability
        ↓
Egolint / Relay / Identity / specialist validator evidence
        ↓
Observatory normalized conformance snapshot (#5)
        ↓
Relay Repository Intelligence `/hygiene/`

The browser must not execute validators or redefine policy.

UX goals

The page should make it immediately obvious that a repository may still be actively useful and under development while some organization contracts are not yet adopted.

Do not frame early infrastructure rollout as catastrophic failure.

For each applicable contract/capability, show:

  • contract/profile ID and version;
  • domain/owner;
  • applicability and why it applies;
  • adoption/conformance state;
  • represented repository revision;
  • evidence freshness;
  • missing/stale/drifted artifacts or checks;
  • remediation/owning issue or documentation when available;
  • declared exception/exemption/migration state;
  • source evidence links.

State vocabulary

Reuse the normalized Observatory/Hygiene state model rather than inventing Relay-local semantics. Preserve states such as:

  • conformant;
  • non-conformant;
  • partial;
  • drifted;
  • migration planned;
  • provisional/advisory;
  • blocked;
  • stale evidence;
  • unknown;
  • unavailable;
  • exempt;
  • not applicable;
  • unsupported/incompatible.

A repository with no evidence must not appear conformant.

Progressive adoption

This view is intentionally useful before the fleet passes every contract.

Support an organization/repository adoption stage such as observe/advisory/ratchet/enforce when provided by Hygiene/Observatory. Rendering a failed or missing contract must not itself force CI to block.

The UI should help the maintainer answer:

  • What is missing?
  • Is it actually required here?
  • Is this already planned?
  • Is the evidence stale versus truly failing?
  • What should I fix next if I choose to work on hygiene?

Domain organization

Group contracts into comprehensible areas such as:

  • repository foundation;
  • identity/Brand Kit;
  • architecture and ADRs;
  • AI/agent context and continuity;
  • engineering/CI/release;
  • public site/publication;
  • legal/trust/accessibility/security;
  • distribution/installability;
  • other profile-driven domains.

The groups are presentation categories, not new policy ownership.

Relationship to other Repository Intelligence routes

Cross-link rather than duplicate:

  • /identity/ for detailed brand/identity material where enabled;
  • /decisions/ for ADR evidence;
  • /audits/ for human/AI audit findings;
  • /health/ for broader operational posture;
  • /releases/, /dependencies/, and other domain views for details.

For example, a missing Identity contract row should link to the Identity source/remediation and /identity/; it should not copy the entire Brand Kit into /hygiene/.

Acceptance criteria

  • /hygiene/ exists as a first-class Repository Intelligence route.
  • The page consumes Observatory's shared conformance model from observatory#5.
  • /hygiene/ is contract-focused and does not duplicate the broader /health/ view.
  • Applicability, adoption/conformance state, evidence freshness, represented revision, and owner are visible per contract.
  • Missing, stale, partial, blocked, exempt, unknown, and not-applicable states are explicit.
  • Advisory/progressive adoption can be rendered without turning every missing contract into a blocking failure.
  • Rows deep-link to source policy, evidence, remediation, and richer domain pages where available.
  • The UI remains useful for repositories with almost no Hygiene adoption yet.
  • Responsive, keyboard, screen-reader, and reduced-motion behavior is verified.
  • Fixtures cover conformant, heavily partial, migration-planned, exempt, and inaccessible cases.
  • Deterministic Repository Intelligence publication includes the route.

Dependencies / related

Non-goals

  • Making Relay the source of Hygiene policy.
  • Re-running validators in the browser.
  • Treating all contracts as universally applicable.
  • Blocking repository development until the organization reaches full conformance.
  • Collapsing all contract status into one opaque percentage.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions