# Implementation Plan - Generic RRULE Formatter ## Phase 1: Reproduction & Test Setup [checkpoint: b41f78c] - [x] Task: Create reproduction test case for `BYDAY` object cfab0c3 - [x] Add a test in `icalendar_test.ts` mocking a `BYDAY` property as an array of objects (e.g. `[{ day: 'MO' }]`). - [x] Run the test and confirm it fails with `SyntaxError: Invalid weekday string: [object Object]`. - [x] Task: Conductor - User Manual Verification 'Reproduction & Test Setup' (Protocol in workflow.md) ## Phase 2: Implementation [checkpoint: 7d1fa9f] - [x] Task: Implement Recursive Formatter 115a165 - [x] Update `formatRRuleValue` in `icalendar.ts` to be a recursive function. - [x] Handle Arrays by joining elements with commas. - [x] Handle `Date` objects using the existing iCal format. - [x] Handle property objects (extract `date`, `day`, or `value` properties). - [x] Run the reproduction test to confirm it passes. - [x] Task: Conductor - User Manual Verification 'Implementation' (Protocol in workflow.md) ## Phase 3: Verification & Cleanup [checkpoint: 952ceb0] - [x] Task: Composite and Regression Testing 1e613ea - [x] Add a complex test case containing both nested `UNTIL` dates and `BYDAY` arrays. - [x] Run the full regression test suite in `icalendar_test.ts`. - [x] Task: Conductor - User Manual Verification 'Verification & Cleanup' (Protocol in workflow.md)