Skip to content

Commit 270145f

Browse files
committed
docs(skills): teach the calendar-hours rule where a hook stamps a deadline
The data-hooks sandbox section now carries the hook-deadline rule: a deadline stamped from an hours table is calendar hours, the table is named `*_CALENDAR_HOURS` (or its camelCase), the arithmetic adds elapsed milliseconds, and wall-clock arithmetic is never labelled "business hours". Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018dxq7YqsLDMeZDZ5AzsgJX
1 parent ffca0df commit 270145f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

skills/objectstack-data/references/data-hooks.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,10 @@ The body runs in an isolated QuickJS VM, **not** Node:
452452
the hook. A `body` must be **self-contained**: inline the helper, or keep that
453453
hook as a bundled `handler`.
454454

455+
> **A deadline stamped from an hours table is calendar hours** — nights, weekends and
456+
> holidays count. Name it `SLA_CALENDAR_HOURS` (or its camelCase) and add elapsed
457+
> milliseconds (`hours * 3_600_000`); never label it "business hours".
458+
455459
### ⚠️ Gotcha 1 — `ctx.result` is a *partial* record on afterUpdate
456460

457461
On `afterUpdate`, both `ctx.result` and `ctx.input` carry only the fields this

0 commit comments

Comments
 (0)