Skip to content

chore: remove obsolete agent card trait requirements - #157

Open
cynfria wants to merge 4 commits into
mainfrom
agent-card-metadata-cleanup
Open

chore: remove obsolete agent card trait requirements#157
cynfria wants to merge 4 commits into
mainfrom
agent-card-metadata-cleanup

Conversation

@cynfria

@cynfria cynfria commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

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_for or vibes remain 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_for and vibes fields 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.

@cynfria
cynfria marked this pull request as ready for review August 21, 2026 00:13
@cynfria
cynfria requested a review from a team August 21, 2026 00:13
@kalvinnchau kalvinnchau changed the title remove obsolete agent card trait requirements chroe: remove obsolete agent card trait requirements Aug 21, 2026
@kalvinnchau kalvinnchau changed the title chroe: remove obsolete agent card trait requirements chore: remove obsolete agent card trait requirements Aug 21, 2026

@morgmart morgmart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.

Comment thread src/shared/api/agents.ts
if (metadataFrontmatter && key in metadataFrontmatter) {
delete metadataFrontmatter[key];
}
delete sanitizedProperties[key];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants