@drawbridge/drawbridge-agents 0.1.15 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,6 +30,12 @@ knowledge graph, and the Asana handoff so nothing drifts at ship time.
30
30
  and retry (do NOT run `graphify install`; it rewrites `CLAUDE.md`).
31
31
  5. **Hand off the task.** Invoke `drawbridge-asana-ship-handoff` with the Asana task to reassign
32
32
  to the last commenter, post the change summary + retest steps, and set the due date.
33
+ 6. **Clear the worktree.** If the feature was built in a git worktree (a sibling directory or a
34
+ `.worktrees/` folder), remove it now that the branch is merged: from the main checkout,
35
+ `git worktree remove <path>` then `git worktree prune`. If the removal complains about
36
+ uncommitted changes, inspect them first — add `--force` only once you've confirmed the dirt
37
+ is disposable (`.claude/` pin state, or edits already superseded on `develop`). Leftover
38
+ merged worktrees pile up and break editor git integrations; the branch itself can stay.
33
39
 
34
40
  ## Notes
35
41
 
@@ -52,7 +52,26 @@ skill) so it stops living only in tribal memory.
52
52
  worker retries it into the update path. The merge path must delete duplicate contacts BEFORE
53
53
  `$set`-ing the survivor (the expanded `leads` array collides with rows about to be deleted).
54
54
  Drop the index → duplicate contacts, doubled segment members, double-billed `contact.create` +
55
- `segment.join`; reorder the merge → every merge aborts E11000 and duplicates never heal.
55
+ `segment.join`; reorder the merge → every merge aborts E11000 and duplicates never heal. The
56
+ merge path also reverses each merged-away contact's **current-period** `action` rows (matched by
57
+ `meta.contact`, in the billing transaction) so the survivor isn't billed once per duplicate.
58
+ - The `action` ledger's **`{ organization : 1, createdAt : 1 }` index** (drawbridge-api
59
+ `schema/action.js`) is a shared dependency: sync's `computeCycleActions` (billing, by `createdAt`
60
+ window) AND api's date-ranged reporting (`route/organization-usage.js`) both match on it. Drop it
61
+ → COLLSCAN on every invoice + usage query.
62
+ - The `action` ledger is **permanent — no TTL** (drawbridge-api `schema/action.js`): the
63
+ proof-of-billing record AND the source for date-ranged usage reporting, both read as raw rows by
64
+ `createdAt`. Re-adding a TTL shorter than any billing interval silently under-bills long cycles
65
+ and blanks reporting past the window — any retention change must clear billing + reporting.
66
+
67
+ ## Reporting (api ↔ app-web)
68
+
69
+ - Every reporting request (usage/revenue/redemptions/analytics, org + admin) carries the viewer's
70
+ IANA `timezone` (app-web sends `Intl.DateTimeFormat().resolvedOptions().timeZone`); drawbridge-api
71
+ buckets the date range in it via `lib/report-window.js` (half-open UTC window, defaults to UTC when
72
+ absent). app-web omitting it → ranges bucket by UTC not the user's calendar days (boundary events
73
+ land on the wrong day). The param rides each endpoint's existing query shape (top-level vs
74
+ `filters`) — do NOT normalise the shapes.
56
75
 
57
76
  ## `@drawbridge/*` package coordination
58
77
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drawbridge/drawbridge-agents",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "Shared agent-instruction content (rules, code style, conventions) for the drawbridge-* monorepo.",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {