Initial Commit
This commit is contained in:
67
openspec/archive/2026-05-20-add-events-ics-export/tasks.md
Normal file
67
openspec/archive/2026-05-20-add-events-ics-export/tasks.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# Tasks — add-events-ics-export
|
||||
|
||||
## 1. Spec authoring
|
||||
|
||||
- [ ] 1.1 Confirm shipped `openspec/specs/api-plugin-events/spec.md` is the canonical baseline (already folded by `add-api-plugin-events` archive)
|
||||
- [ ] 1.2 Author `proposal.md` with `## Why`, `## What changes`, `## Source mapping` (each row citing RFC 5545 section or existing event-schema field)
|
||||
- [ ] 1.3 Author `specs/api-plugin-events/spec.md` with `## ADDED Requirements` for the ICS endpoint, escape rules, line-folding, RSVP attendees, new error code, OTel counters
|
||||
- [ ] 1.4 Every `### Requirement` carries a `**Verified by:**` line naming planned test files (authored at draft time per §0c)
|
||||
|
||||
## 2. Implementation — ICS builder
|
||||
|
||||
- [ ] 2.1 `src/ics/ics-builder/ics-builder.ts` — `buildVCalendar`, `foldLine`, `escapeText`, `formatDateUtc`, `mapStatus`, `mapAttendeeStatus`
|
||||
- [ ] 2.2 `src/ics/ics-builder/ics-builder.types.ts` — public types (`BuildVCalendarInput`, `IcsAttendee`, `IcsEventStatus`)
|
||||
- [ ] 2.3 `src/ics/ics-builder/ics-builder.md` — ≥200-word sibling doc (Purpose / Features / Basic / Advanced / API Reference / Implementation Notes)
|
||||
- [ ] 2.4 `src/ics/ics-builder/ics-builder.test.ts` — byte-level fold, escape, CRLF, UTC date format, status / PARTSTAT maps, with-rsvps body
|
||||
- [ ] 2.5 `src/ics/ics-builder/index.ts` — explicit named re-exports
|
||||
|
||||
## 3. Implementation — error code, OTel, routes
|
||||
|
||||
- [ ] 3.1 Extend `EVENTS_PLUGIN_CODES` with `ICS_INVALID_QUERY`
|
||||
- [ ] 3.2 Extend `EventsInstruments` with `icsServedTotal` + `icsFailedTotal`
|
||||
- [ ] 3.3 `src/routes/ics-export/ics-export.ts` — `createIcsExportRoutes({ eventRepository, rsvpRepository, clock, instruments? })`
|
||||
- [ ] 3.4 `src/routes/ics-export/ics-export.types.ts` — `IcsExportRoutesConfig`
|
||||
- [ ] 3.5 `src/routes/ics-export/ics-export.md` — ≥200-word sibling doc
|
||||
- [ ] 3.6 `src/routes/ics-export/ics-export.test.ts` — 200 / 401 / 404 / 403 / 422 paths, header asserts, OTel asserts
|
||||
- [ ] 3.7 `src/routes/ics-export/index.ts` — explicit named re-exports
|
||||
|
||||
## 4. Wire-up
|
||||
|
||||
- [ ] 4.1 `plugin.ts` `onReady` mounts `createIcsExportRoutes` alongside `createEventRoutes` under the same `basePath`
|
||||
- [ ] 4.2 `plugin.test.ts` extended to assert the ICS route is mounted
|
||||
- [ ] 4.3 `src/index.ts` re-exports `createIcsExportRoutes`, `buildVCalendar`, `BuildVCalendarInput`, `IcsAttendee`, `IcsExportRoutesConfig`, `IcsEventStatus`
|
||||
- [ ] 4.4 `package.json` — add `./ics/ics-builder/ics-builder` and `./routes/ics-export/ics-export` subpath exports
|
||||
- [ ] 4.5 `README.md` — add Modules entries; add ICS quickstart snippet
|
||||
|
||||
## 5. Tests
|
||||
|
||||
- [ ] 5.1 `src/error-codes/error-codes.test.ts` — pin `ICS_INVALID_QUERY` is reachable from a real `throw`/`return` site
|
||||
- [ ] 5.2 `src/otel/instruments.test.ts` — extend with `icsServedTotal` + `icsFailedTotal` assertions
|
||||
- [ ] 5.3 `src/api-plugin-events.spec-conformance.test.ts` — pin `createIcsExportRoutes`, `buildVCalendar` re-exports
|
||||
- [ ] 5.4 Every new `it(...)` carries `{ timeout: 5000 }` (or 30000 for genuinely async)
|
||||
|
||||
## 6. Pre-archive verification — 5-gate triple
|
||||
|
||||
- [ ] 6.1 `bunx biome check src/` — clean
|
||||
- [ ] 6.2 `bunx turbo lint typecheck test --filter=@suaveplan/api-plugin-events` — green
|
||||
- [ ] 6.3 `bunx turbo test:coverage --filter=@suaveplan/api-plugin-events` — 100 / 100 / 100 / 100
|
||||
- [ ] 6.4 `bun scripts/openspec-conformance.ts @suaveplan/api-plugin-events` — 0 errors
|
||||
- [ ] 6.5 `bunx turbo build --filter=@suaveplan/api-plugin-events` — green
|
||||
|
||||
## 7. Pre-archive 9-row checklist (AGENTS.md §13)
|
||||
|
||||
- [ ] 7.1 Spec reconciliation — every `### Requirement` walked, every `**Verified by:**` test exists
|
||||
- [ ] 7.2 Banned-pattern scan — zero `TODO|FIXME|ts-ignore|ts-expect-error|.skip|.only`
|
||||
- [ ] 7.3 Barrel-shape scan — no `export *` in feature `index.ts`
|
||||
- [ ] 7.4 Test-runner imports — every test file imports only from `@suaveplan/testing/runner`
|
||||
- [ ] 7.5 Missing `.md` scan — every implementation `.ts` has a sibling `.md`
|
||||
- [ ] 7.6 Bare version check — no bare semver in `package.json`
|
||||
- [ ] 7.7 Subpath export count — matches feature-module count
|
||||
- [ ] 7.8 Security scan — no hardcoded secrets
|
||||
- [ ] 7.9 No biome-ignore suppressions in new code
|
||||
|
||||
## 8. Archive
|
||||
|
||||
- [ ] 8.1 Fold spec delta into `openspec/specs/api-plugin-events/spec.md`
|
||||
- [ ] 8.2 Move `openspec/changes/add-events-ics-export/` → `openspec/archive/2026-05-20-add-events-ics-export/`
|
||||
- [ ] 8.3 One commit `feat(api-plugin-events): add ICS export endpoint (was §4-deferred)` — pre-pull-rebase first, never `--no-verify`, never force-push
|
||||
Reference in New Issue
Block a user