@drawbridge/drawbridge-agents 0.1.40 → 0.1.43

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.
@@ -137,6 +137,19 @@ skill) so it stops living only in tribal memory.
137
137
  - **A subscription must open with the plan item.** It used to open with the metered actions price
138
138
  and attach the plan afterwards with `always_invoice`. With no metered item, Stripe rejects an
139
139
  itemless subscription, so the plan goes in at creation — changing the first invoice's shape.
140
+ - **Ending a subscription is written twice, from ONE implementation** (stripe ↔ api ↔ sync).
141
+ `subscription.markTerminal` in **drawbridge-stripe** (`lib/subscription.js`, takes the caller's
142
+ db controller + session like `reconcile`) clears the org's `subscription` pointer, demotes to
143
+ `unsubscribed` under `status : { $nin : [ 'suspended', 'unsubscribed' ] }`, `$pull`s the org's
144
+ `type : 'method'` errors and flips the sub doc to `canceled`. Both callers run it: sync's
145
+ `markSubscriptionTerminal` (`lib/buffer.js`, on `customer.subscription.deleted` and terminal
146
+ `subscription.updated`) and drawbridge-api's admin cancel
147
+ (`route/organization-subscription.js` `handlers.delete.cancel`), which mirrors it inline so the
148
+ page isn't stale for a webhook it just caused. **The mirror runs FIRST and consumes the status
149
+ guard**, so the webhook's pass then matches nothing — anything one caller does outside
150
+ `markTerminal` therefore never happens on the admin path. Never re-inline these writes: the
151
+ hand-copied version drifted, and a stale card decline outlived its subscription and permanently
152
+ blocked the org from resubscribing (Asana 1217947409527192).
140
153
  - **Invoice line descriptions must keep the word "actions":** `isActionsLine` matches `/actions/i`
141
154
  to count billed quantity for the billed-vs-ledger reconcile. A copy edit that drops it silently
142
155
  breaks the audit. Detail: drawbridge-docs `reference/billing.md`.
@@ -8,7 +8,12 @@ drawbridge-docs/superpowers/plans/YYYY-MM-DD-<slug>.md
8
8
  drawbridge-docs/superpowers/specs/YYYY-MM-DD-<slug>.md
9
9
  ```
10
10
 
11
- This is the **only** allowed home for these working docs. Rules:
11
+ **THE ONE EXCEPTION IS drawbridge-growth** (Darren, repeatedly, most recently 2026-09-01:
12
+ "Don't add growth docs to docs"): growth is its own system — its plans and specs live in
13
+ `drawbridge-growth/docs/superpowers/{plans,specs}/` and must **never** be written to
14
+ drawbridge-docs. The guard hook exempts any `drawbridge-growth*` path for this reason.
15
+
16
+ For every other repo, this is the **only** allowed home for these working docs. Rules:
12
17
 
13
18
  - Do **not** create or keep superpowers plans/specs (or `docs/superpowers/`, `docs/plans/`)
14
19
  inside any other repo. When you finalize a plan or spec, write it under
@@ -47,6 +47,11 @@ const run = () => {
47
47
  // drawbridge-docs is the canonical home — anything there is fine.
48
48
  if (resolved.split('/').includes('drawbridge-docs')) process.exit(0)
49
49
 
50
+ // GROWTH IS THE EXCEPTION (Darren, repeatedly, most recently 2026-09-01):
51
+ // growth is its own system and its docs stay in drawbridge-growth — never
52
+ // in drawbridge-docs. Any growth checkout or worktree passes.
53
+ if (/\/drawbridge-growth[^/]*\//.test(resolved + '/')) process.exit(0)
54
+
50
55
  const hit = FORBIDDEN.find((seg) => resolved.includes('/' + seg + '/') || resolved.endsWith('/' + seg))
51
56
  if (!hit) process.exit(0)
52
57
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drawbridge/drawbridge-agents",
3
- "version": "0.1.40",
3
+ "version": "0.1.43",
4
4
  "description": "Shared agent-instruction content (rules, code style, conventions) for the drawbridge-* monorepo.",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {