@drawbridge/drawbridge-agents 0.1.7 → 0.1.8

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.
package/claude/CLAUDE.md CHANGED
@@ -16,3 +16,4 @@
16
16
  @../conventions/superpowers-docs.md
17
17
  @../conventions/git-branching.md
18
18
  @../conventions/graphify.md
19
+ @../conventions/testing.md
@@ -0,0 +1,25 @@
1
+ # Testing
2
+
3
+ Full strategy, conventions, and per-repo coverage map live in
4
+ `drawbridge-docs/testing/README.md`. The essentials:
5
+
6
+ - **Run `npm test` before shipping.** Every service and package has a
7
+ `node:test` suite (`node --test test/`). Run it with the family Node
8
+ (`nvm use`).
9
+ - **Unit tests live in the repo they test** — `test/*.test.js`, zero
10
+ dependencies, no README (knowledge is centralized in drawbridge-docs). They
11
+ version with the code and gate package publishes
12
+ (`tsup && node --test test/ && npm publish`).
13
+ - **Black-box tests live in `drawbridge-tests`** — the Playwright smoke pack,
14
+ the k6 load scenarios, and the family results ledger. No app or package repo
15
+ carries E2E or load tooling.
16
+ - **Two standing policies:** every repo keeps an export-smoke test (a dropped
17
+ export is a silent-undefined production throw — this has happened); every
18
+ fixed production incident gets a same-day regression test naming the
19
+ incident.
20
+ - **Next.js apps get pure-logic tests only** — no jsdom/component testing; UI
21
+ correctness is the smoke pack's job. Extract a pure seam into `lib/` rather
22
+ than importing a react/next module into a test.
23
+ - When a module reads env at require time, stub dummies BEFORE the require.
24
+ Node v20.9's MockTimers mishandles interleaved clears — use real timers for
25
+ timer-based logic.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drawbridge/drawbridge-agents",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Shared agent-instruction content (rules, code style, conventions) for the drawbridge-* monorepo.",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
@@ -8,7 +8,8 @@
8
8
  },
9
9
  "scripts": {
10
10
  "sync": ". \"$HOME/.nvm/nvm.sh\" && nvm use && npm prune && npm install",
11
- "build": "npm publish"
11
+ "test": ". \"$HOME/.nvm/nvm.sh\" && nvm use && node --test",
12
+ "build": ". \"$HOME/.nvm/nvm.sh\" && nvm use && node --test && npm publish"
12
13
  },
13
14
  "bin": {
14
15
  "drawbridge-agents-sync": "bin/sync-claude.js",