--- name: calendar_meeting_series_rungs description: "Set up a recurring weekly meeting on specific days with a set number of occurrences and a pop-up reminder a certain number of minutes before it starts. calendar_meeting_series_rungs: An iCalendar file (RFC 5545): one VCALENDAR with VERSION:2.0 and exactly the given PRODID, containing exactly one VEV" --- # calendar_meeting_series_rungs (a Neruva verified skill for `calendar`) Set up a recurring weekly meeting on specific days with a set number of occurrences and a pop-up reminder a certain number of minutes before it starts. Verified helper code for `calendar`, python. Entry points: `parse_utc_stamp`, `create_vevent`, `create_calendar`, `serialize_calendar`, `write_ics`. Code hash sha256 `49e3cb7a727c6c0cc007fc90c45c885d8dc85c0933cc820d75142fa0e170d813`, signed (ed25519). Banked by `legacy-dev`. ## One call Call `build(**args)` with an object matching this schema. You do not have to write code or match the helper signatures below. ```json { "type": "object", "properties": { "output_path": { "type": "string", "description": "Filesystem path where the .ics file will be written. Parent directories will be created if they do not exist." }, "uid": { "type": "string", "description": "Unique identifier for the VEVENT (UID field)." }, "summary": { "type": "string", "description": "Event title/summary text (SUMMARY field), also used as the VALARM description." }, "location": { "type": "string", "description": "Event location text (LOCATION field)." }, "dtstart": { "type": "string", "description": "Event start time as a UTC timestamp string ending in 'Z', format %Y%m%dT%H%M%SZ, e.g. '20250503T060000Z'." }, "dtend": { "type": "string", "description": "Event end time as a UTC timestamp string ending in 'Z', format %Y%m%dT%H%M%SZ, e.g. '20250503T063000Z'." }, "byday": { "type": "array", "items": { "type": "string" }, "description": "List of two-letter weekday codes for the RRULE BYDAY, e.g. ['MO', 'SA', 'FR']." }, "count": { "type": "integer", "description": "Number of occurrences for the RRULE COUNT value." }, "alarm_minutes": { "type": "integer", "description": "Number of minutes before DTSTART that the VALARM TRIGGER fires (given as a positive integer; will be applied as a negative duration)." }, "prodid": { "type": "string", "description": "PRODID value for the VCALENDAR, e.g. '-//Stark//Cal//EN'." } }, "required": [ "output_path", "uid", "summary", "location", "dtstart", "dtend", "byday", "count", "alarm_minutes", "prodid" ] } ``` Example arguments: ```json { "output_path": "/tmp/calendars/retro_series.ics", "uid": "call-0139@stark.example", "summary": "Retro", "location": "Room 5", "dtstart": "20250503T060000Z", "dtend": "20250503T063000Z", "byday": [ "MO", "SA", "FR" ], "count": 15, "alarm_minutes": 30, "prodid": "-//Stark//Cal//EN" } ``` ```python def build(**kwargs): output_path = kwargs["output_path"] uid = kwargs["uid"] summary = kwargs["summary"] location = kwargs["location"] dtstart = kwargs["dtstart"] dtend = kwargs["dtend"] byday = kwargs["byday"] count = kwargs["count"] alarm_minutes = kwargs["alarm_minutes"] prodid = kwargs["prodid"] event = create_vevent(uid, summary, location, dtstart, dtend, byday, count, alarm_minutes) cal = create_calendar(prodid, event) data_bytes = serialize_calendar(cal) parent_dir = os.path.dirname(output_path) if parent_dir: os.makedirs(parent_dir, exist_ok=True) write_ics(output_path, data_bytes) return output_path ``` ## How to use it Helper functions for building an RFC 5545 iCalendar file with one VEVENT, an RRULE, and one VALARM, using CRLF line endings. 1. parse_utc_stamp(dtstr) - Parameters: dtstr (str) - a UTC timestamp string ending in 'Z', e.g. "20250503T060000Z" - Returns: an aware datetime.datetime in UTC - Example: parse_utc_stamp("20250503T060000Z") 2. create_vevent(uid, summary, location, dtstart, dtend, byday, count, alarm_minutes) - Parameters: uid (str), summary (str), location (str) dtstart (str), dtend (str): UTC timestamp strings ending in 'Z' byday (list[str]): weekday codes like ["MO", "SA", "FR"] count (int): RRULE COUNT alarm_minutes (int): minutes before dtstart the VALARM triggers - Returns: icalendar.Event populated with DTSTART, DTEND, SUMMARY, LOCATION, UID, RRULE (FREQ=WEEKLY;BYDAY=...;COUNT=...), and a VALARM child component with ACTION:DISPLAY and a negative-duration TRIGGER. - Example: create_vevent("call-0139@stark.example", "Retro", "Room 5", "20250503T060000Z", "20250503T063000Z", ["MO", "SA", "FR"], 15, 30) 3. create_calendar(prodid, events) - Parameters: prodid (str): PRODID value events: a single icalendar.Event or a list of them - Returns: icalendar.Calendar with VERSION:2.0, the given PRODID, and the given VEVENT(s) added. - Example: create_calendar("-//Stark//Cal//EN", event) 4. serialize_calendar(cal) - Parameters: cal (icalendar.Calendar) - Returns: bytes of the serialized calendar with CRLF line endings - Example: serialize_calendar(cal) 5. write_ics(path, data_bytes) - Parameters: path (str) output file path, data_bytes (bytes) content - Returns: None (writes file to disk in binary mode) - Example: write_ics("/tmp/out.ics", data_bytes) ## Evidence (corpus named) - held-out 16 specs, best-of-2, deepseek-chat: cold 0.375 -> 0.875 with the rung (CI +0.250..+0.750); helper reuse 1.00 - checker forged and mutation-gated, not hand-written: references accepted, every spoiler rejected, empty rejected, on 2 given specs plus 6 generated ($0.13) - stage-1 gate before forging: 2/8 for the cheap tier cold, so the gate opened ## Files - `scripts/skill.py`: the verified code (GET /v1/commons/rungs/rec_2e2daa08322849fba91a24b7fccf560c/code) - verify: POST /v1/commons/verify {"id": "rec_2e2daa08322849fba91a24b7fccf560c"}