|
| 1 | +# Roadmap: @power-rent/try-catch |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +This roadmap delivers a fluent, type-safe Try API first, then layers in Sentry reporting with runtime entry points and diagnostics. Documentation comes last to ensure examples reflect the real behavior users will see. |
| 6 | + |
| 7 | +## Phases |
| 8 | + |
| 9 | +**Phase Numbering:** |
| 10 | +- Integer phases (1, 2, 3): Planned milestone work |
| 11 | +- Decimal phases (2.1, 2.2): Urgent insertions (marked with INSERTED) |
| 12 | + |
| 13 | +Decimal phases appear between their surrounding integers in numeric order. |
| 14 | + |
| 15 | +- [ ] **Phase 1: Core Try Semantics** - Users can handle sync/async errors with typed outcomes. |
| 16 | +- [ ] **Phase 2: Reporting + Runtime Entry Points** - Users can report errors with Sentry across environments, with diagnostics. |
| 17 | +- [ ] **Phase 3: Documentation & Examples** - Users can follow clear docs that match real behavior. |
| 18 | + |
| 19 | +## Phase Details |
| 20 | + |
| 21 | +### Phase 1: Core Try Semantics |
| 22 | +**Goal**: Users can handle sync/async errors with a type-safe Try API. |
| 23 | +**Depends on**: Nothing (first phase) |
| 24 | +**Requirements**: TRY-01, TRY-02, TRY-03, TRY-04 |
| 25 | +**Success Criteria** (what must be TRUE): |
| 26 | + 1. User can wrap sync functions with `new Try(fn, ...args)` and retrieve outcomes via `.value()`, `.error()`, or `.unwrap()`. |
| 27 | + 2. User can wrap async functions with the same API and retain correct TypeScript inference for success and error channels. |
| 28 | + 3. User can supply a fallback via `.default(value)` and receive it on error. |
| 29 | +**Plans**: TBD |
| 30 | + |
| 31 | +Plans: |
| 32 | +- [ ] 01-01: TBD |
| 33 | + |
| 34 | +### Phase 2: Reporting + Runtime Entry Points |
| 35 | +**Goal**: Users can report errors with Sentry across runtimes, with clear diagnostics. |
| 36 | +**Depends on**: Phase 1 |
| 37 | +**Requirements**: SENT-01, SENT-02, SENT-03, SENT-04, ENTRY-01, ENTRY-02, ENTRY-03, DIAG-01, DIAG-02 |
| 38 | +**Success Criteria** (what must be TRUE): |
| 39 | + 1. User can call `.report(message)` to send the current error to Sentry. |
| 40 | + 2. User can attach tags and breadcrumbs in the fluent chain before reporting. |
| 41 | + 3. Reporting defaults avoid noisy handled errors unless explicitly requested. |
| 42 | + 4. User can import runtime-specific entry points (`/node`, `/browser`, `/nextjs`) with consistent reporting behavior. |
| 43 | + 5. Breadcrumbs configuration is type-safe and matches README examples. |
| 44 | + 6. Non-Error throws are normalized to Error before reporting, and debug mode logs locally without Sentry. |
| 45 | +**Plans**: TBD |
| 46 | + |
| 47 | +Plans: |
| 48 | +- [ ] 02-01: TBD |
| 49 | + |
| 50 | +### Phase 3: Documentation & Examples |
| 51 | +**Goal**: Users can rely on docs/examples that reflect real Try and reporting behavior. |
| 52 | +**Depends on**: Phase 2 |
| 53 | +**Requirements**: DX-01 |
| 54 | +**Success Criteria** (what must be TRUE): |
| 55 | + 1. User can follow docs/examples for core Try usage that read like native English error handling and match actual outcomes. |
| 56 | + 2. User can follow docs/examples for reporting and entry points that reflect real `report()` behavior and configuration. |
| 57 | +**Plans**: TBD |
| 58 | + |
| 59 | +Plans: |
| 60 | +- [ ] 03-01: TBD |
| 61 | + |
| 62 | +## Progress |
| 63 | + |
| 64 | +**Execution Order:** |
| 65 | +Phases execute in numeric order: 2 → 2.1 → 2.2 → 3 → 3.1 → 4 |
| 66 | + |
| 67 | +| Phase | Plans Complete | Status | Completed | |
| 68 | +|-------|----------------|--------|-----------| |
| 69 | +| 1. Core Try Semantics | 0/TBD | Not started | - | |
| 70 | +| 2. Reporting + Runtime Entry Points | 0/TBD | Not started | - | |
| 71 | +| 3. Documentation & Examples | 0/TBD | Not started | - | |
0 commit comments