chore: remove obsolete agent card trait requirements - #157
Conversation
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
REQUEST_CHANGES: the cleanup removes obsolete trait rendering, but it also deletes good_for and vibes at import/export boundaries instead of preserving them as opaque legacy metadata, contradicting the PR's compatibility promise and causing lossy round trips. Static review covered all 22 changed files and every affected flow (bundled-agent validation, source hydration, create/import preview, native and Markdown import, export, snapshot import/export, and share-card rendering/layout), plus accessibility, localization, navigation/consent, async/lifecycle/races, test honesty, and project/design-system rules. No additional issues survived the final overlap and evidence check. Supplied GitHub evidence was inspected: seven checks had succeeded and Transcript virtualization was still in progress at capture time; required checks still govern merge readiness.
Deterministic publication result: 1 blocking and 0 non-blocking finding(s) publishable; 0 duplicate(s) suppressed.
| if (metadataFrontmatter && key in metadataFrontmatter) { | ||
| delete metadataFrontmatter[key]; | ||
| } | ||
| delete sanitizedProperties[key]; |
There was a problem hiding this comment.
🤖 P1 · Preserve legacy traits during round trips (blocking)
The new sanitizer explicitly deletes good_for and vibes from both native-agent properties and metadata.frontmatter. The same PR also stops retaining those keys from persona Markdown and stops serializing them on export. Removing the fields from rendering and typed Persona state does not require discarding them at file boundaries; this makes import/export lossy and conflicts with the PR's stated promise that existing metadata remains readable and round-trippable.
User effect: A user who imports an agent carrying these legacy fields and later exports or shares it silently loses metadata that another Berd version or compatible tool may still use.
Recommended fix: Keep good_for and vibes as opaque compatibility metadata through native JSON and persona Markdown import/export while continuing to omit them from Persona, previews, snapshots, validation requirements, and share-card rendering. Preserve direct-field precedence where both direct and nested legacy values exist.
Test: Add discriminating round-trip tests for both native agent JSON and persona Markdown: import content containing good_for and vibes, export it again, and assert the exact values survive without appearing in the rendered/share-card model. Include the direct-versus-nested precedence case.
There was a problem hiding this comment.
🤖 We’re intentionally declining this change. The product decision is to retire good_for and vibes from Berd’s active and portable model rather than preserve them indefinitely as opaque compatibility metadata. Legacy files remain importable, but these fields are ignored and omitted from subsequent exports by design. I updated the PR description to make that intentional lossy boundary explicit.
Category: improvement
User Impact: Generated agent cards now use only the avatar, title, and description, and obsolete Good for or Vibes metadata is retired from Berd.
Problem: The card renderer no longer displays Good for or Vibes, but bundled agents, imports, snapshots, validation, and localized helpers still treated those fields as active product metadata. Solution: Remove the fields from Berd's active and portable model. Legacy files containing
good_fororvibesremain importable, but Berd intentionally ignores those fields and omits them from subsequent exports rather than preserving them indefinitely as opaque compatibility metadata.File changes
distro/agents/*.md
Removes obsolete
good_forandvibesfields from bundled agent definitions.scripts/validate-bundled-agents.ts
Removes bundled-agent validation for the retired trait fields.
src/features/agents/agent-snapshot/schema.ts
Removes the trait fields from newly authored snapshot profiles while the open snapshot shape continues tolerating unknown legacy fields.
src/features/agents/agent-snapshot/mapping.ts
Stops importing and exporting legacy trait metadata in snapshots.
src/features/agents/ui/share-card/agentShareCardCopy.ts
Removes the unused trait-copy resolver.
src/features/agents/ui/share-card/agentShareCardLayout.ts
Removes the unused trait-line layout helper.
src/features/agents/ui/share-card/AgentShareDialog.tsx
Removes retired trait metadata from card render identity.
src/shared/api/agents.ts
Removes trait metadata from the active persona model, previews, and exports; legacy native import fields are recognized and discarded.
src/shared/types/agents.ts
Removes Good for and Vibes from active persona and create-request contracts.
src/shared/i18n/locales/en/agents.json
Removes unused English card labels and generated trait strings.
src/shared/i18n/locales/es/agents.json
Removes unused Spanish card labels and generated trait strings.
Tests
Replaces obsolete rendering and round-trip expectations with coverage that legacy fields are tolerated but ignored.