Awesome Reviewers

When code derives behavior (actions, dedupes, counts, ordering) from collections, make the algorithm deterministic by using stable identifiers and centralized predicate/key logic—never by relying on mutable positional indexes or ad-hoc normalization scattered across call sites.

Apply these rules:

Example patterns:

// later: resolve only the IDs captured at creation time function openViewChanges(result: Result, activitiesById: Map<string, Activity>) { const activities = result.activityIds.map(id => activitiesById.get(id)).filter(Boolean); // open UI with activities (not activities[0]) }

- Canonical dedupe key:
```ts
function getSessionArtifactKey(artifact: ISessionArtifact): string {
  // All normalization rules live here (files/URIs vs GitHub links vs commit hashes)
  // so every dedupe/match uses the same identity.
  return /* ... */;
}

const seen = new Set<string>();
for (const a of artifacts) {
  const key = getSessionArtifactKey(a);
  if (seen.has(key)) continue;
  seen.add(key);
}