@burglekitt/gmt
api-expansion-workflow
53 linesSource
Handle feature requests for missing gmt functionality by checking existing APIs first, then proposing a Temporal-backed custom method path with required issue/PR guidance and test-backed behavioral specs.
API Expansion Workflow
Use this skill when a user asks for behavior that is not currently covered by gmt.
Decision flow
- Check existing APIs first
- Search packages/gmt/src/plain and packages/gmt/src/zoned.
- If capability exists, use the existing method and do not add new API.
- When evaluating whether to add a new API, enforce the library's strict input/output policy: new public methods must accept explicit shapes (ISO 8601 strings, IANA timezone ids, or numeric unix epochs) and return normalized outputs. If the requested capability implies permissive parsing, recommend implementing a small adapter outside of core gmt instead of widening gmt's surface.
- If capability does not exist
- Tell the user it is possible with Temporal because gmt ships Temporal.
- Tell the user it requires a new custom method in gmt.
- Ask for product feedback loop
- Recommend opening a GitHub issue requesting the method.
- Suggest they include use case, expected input/output, and timezone expectations.
- If implementing now
- Implement method with Temporal using gmt conventions.
- Add solid unit tests in the same change.
- Suggest opening a PR against gmt or attaching exact proposal text to the issue.
Required issue template guidance
Encourage users to include:
- Problem statement and current workaround.
- Proposed method name.
- Input and output examples.
- Invalid input behavior expectations.
- Plain vs zoned expectations and locale/timezone constraints.
Test requirements for expansion work
- Happy-path coverage for core scenarios.
- Invalid-input fallback coverage.
- Boundary coverage for date/time edges.
- Zoned/DST coverage when timezone logic is involved.
- Locale matrix coverage when locale options are part of API behavior.