Add YAML support for persona files #57

Closed
opened 2026-05-10 17:11:09 +00:00 by rodin · 0 comments
Owner

Summary

Add YAML support for persona configuration files. YAML provides cleaner multi-line strings and supports comments, making persona definitions more readable and maintainable.

Requirements

  • Support both YAML and JSON formats for persona files
  • Detect format by file extension (.yaml/.yml vs .json)
  • Convert built-in personas to YAML format
  • Keep JSON parsing as fallback for backwards compatibility

Library

Use github.com/goccy/go-yaml v1.16.0 or later.

Why this library:

  • Actively maintained (10 releases in the last year, current v1.19.2)
  • Security issue (AIKIDO-2024-10486, DoS via deep nesting) was fixed promptly in v1.16.0
  • gopkg.in/yaml.v3 is abandoned (no code changes since May 2022)

Implementation Notes

  • Update parsePersona() to detect format and use appropriate parser
  • YAML files should use .yaml extension (not .yml) for consistency
  • Validate that deeply nested YAML is rejected (defense in depth)
## Summary Add YAML support for persona configuration files. YAML provides cleaner multi-line strings and supports comments, making persona definitions more readable and maintainable. ## Requirements - Support both YAML and JSON formats for persona files - Detect format by file extension (`.yaml`/`.yml` vs `.json`) - Convert built-in personas to YAML format - Keep JSON parsing as fallback for backwards compatibility ## Library Use `github.com/goccy/go-yaml` v1.16.0 or later. **Why this library:** - Actively maintained (10 releases in the last year, current v1.19.2) - Security issue (AIKIDO-2024-10486, DoS via deep nesting) was fixed promptly in v1.16.0 - `gopkg.in/yaml.v3` is abandoned (no code changes since May 2022) ## Implementation Notes - Update `parsePersona()` to detect format and use appropriate parser - YAML files should use `.yaml` extension (not `.yml`) for consistency - Validate that deeply nested YAML is rejected (defense in depth)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rodin/review-bot#57