Skip to content

feat(unic-pr-review): content-aware types gate for type-design-analyzer #215

@orioltf

Description

@orioltf

What to build

Replace type-design-analyzer's "any .ts/.tsx" path trigger with a content gate that spawns when the diff adds or modifies type-level declarations — type aliases, interfaces, enums, .d.ts content, generic parameters, and inline structural casts (e.g. (x as { cancelled?: boolean })). Reuses the diff → analyser plumbing from #213. Bias toward spawning on ambiguity (per ADR-0008, #212).

Today the gate fires on every TypeScript file regardless of whether a type changed (it "got lucky" on PR #5612). After this slice it fires on type-level change only — but the PR #5612 inline cast must still trigger it.

Acceptance criteria

  • type-design-analyzer spawns when the diff adds/modifies type declarations or casts.
  • It does NOT spawn for a .ts/.tsx change with no type-level change (e.g. a pure logic edit).
  • Inline structural casts (the PR #5612 (error as { cancelled?: boolean }) case) trigger it.
  • The gate is a pure function over diff hunks with node:test fixtures: type alias added, interface modified, inline cast, no-type-change .tsx edit.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    app:unic-pr-reviewArea: apps/claude-code/unic-pr-reviewfeatureNew capabilityready-for-agentFully specified, ready for an AFK agent

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions