Skip to content

refactor(rees): introduce modular analyzer manifests #1809

Description

@JSONbored

Context

REES analyzer work is currently conflict-prone because new analyzers tend to edit the same central files: review-enrichment/src/brief.ts, review-enrichment/src/types.ts, review-enrichment/src/render.ts, engine allow-lists, UI metadata, and shared tests.

This issue creates the modular substrate so future analyzer PRs can be isolated to their own analyzer folder instead of repeatedly colliding with each other.

Parent: #1499

Deliverables

  • Add a per-analyzer manifest/descriptor pattern under review-enrichment/src/analyzers/<name>/.
  • Move analyzer metadata into descriptors: name, category, cost class, default enabled state, external requirements, timeout/limit defaults, docs text, and renderer hook.
  • Replace the hand-maintained analyzer registry in brief.ts with a registry built from analyzer descriptors.
  • Keep existing analyzer names and response compatibility intact.
  • Make new analyzer PRs touch their own analyzer module first, with central files avoided or generated.
  • Document the contribution pattern for analyzer authors.

Requirements

  • Do not add new analyzer behavior in this issue.
  • Do not remove existing analyzers.
  • Preserve current REES_ANALYZERS behavior.
  • Keep the response schema backward compatible for the engine.
  • Do not include secrets, request bodies, diffs, raw prompts, comments, tokens, or private configs in descriptors or logs.

Acceptance criteria

  • Existing REES tests pass.
  • At least two existing analyzers are represented through the new descriptor path as proof of pattern, or all analyzers are migrated if the patch stays manageable.
  • Adding a new analyzer no longer requires manually editing every central runtime/render/config surface.
  • The parent roadmap can point future analyzer issues at this pattern.

Validation

  • npm run test:ci -- --runInBand review-enrichment/test or the closest focused REES test command available in the repo.
  • npm run test:coverage if touched lines fall under covered src/** paths.

Ownership

Maintainer-only. No gittensor:* labels.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions