get-tbd 0.2.0 → 0.2.2
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/dist/bin.mjs +551 -168
- package/dist/bin.mjs.map +1 -1
- package/dist/cli.mjs +492 -159
- package/dist/cli.mjs.map +1 -1
- package/dist/docs/SKILL.md +2 -2
- package/dist/docs/guidelines/bun-monorepo-patterns.md +65 -66
- package/dist/docs/guidelines/cli-agent-skill-patterns.md +396 -158
- package/dist/docs/guidelines/common-doc-guidelines.md +2 -2
- package/dist/docs/guidelines/convex-limits-best-practices.md +39 -39
- package/dist/docs/guidelines/convex-rules.md +13 -13
- package/dist/docs/guidelines/electron-app-development-patterns.md +18 -18
- package/dist/docs/guidelines/general-comment-rules.md +1 -1
- package/dist/docs/guidelines/general-tdd-guidelines.md +4 -4
- package/dist/docs/guidelines/golden-testing-guidelines.md +9 -9
- package/dist/docs/guidelines/pnpm-monorepo-patterns.md +49 -49
- package/dist/docs/guidelines/python-cli-patterns.md +1 -1
- package/dist/docs/guidelines/python-modern-guidelines.md +4 -4
- package/dist/docs/guidelines/release-notes-guidelines.md +18 -2
- package/dist/docs/guidelines/supply-chain-hardening.md +84 -29
- package/dist/docs/guidelines/tbd-sync-troubleshooting.md +3 -3
- package/dist/docs/guidelines/typescript-cli-tool-rules.md +17 -17
- package/dist/docs/guidelines/typescript-code-coverage.md +5 -5
- package/dist/docs/guidelines/typescript-rules.md +3 -3
- package/dist/docs/guidelines/typescript-yaml-handling-rules.md +3 -3
- package/dist/docs/shortcuts/system/skill-baseline.md +2 -2
- package/dist/docs/tbd-design.md +40 -40
- package/dist/docs/tbd-docs.md +1 -1
- package/dist/docs/tbd-prime.md +3 -3
- package/dist/{id-mapping-CtfTfGIh.mjs → id-mapping-687_UEsy.mjs} +66 -16
- package/dist/id-mapping-687_UEsy.mjs.map +1 -0
- package/dist/{id-mapping-CFoPVinz.mjs → id-mapping-mtoSP9Qt.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-rIE4xSVs.mjs → src-BpvcrLnq.mjs} +2 -2
- package/dist/{src-rIE4xSVs.mjs.map → src-BpvcrLnq.mjs.map} +1 -1
- package/dist/tbd +551 -168
- package/package.json +1 -1
- package/dist/id-mapping-CtfTfGIh.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Common Documentation Guidelines
|
|
3
|
-
description: Common cross-project standards for writing and organizing docs, code comments, and text files
|
|
3
|
+
description: Common cross-project standards for writing and organizing docs, code comments, and text files—how to organize, structure, write, and format documents, plus the guideline footer convention. Downstream of github.com/jlevy/practical-prose. Use whenever writing or editing any documentation, README, guideline, or design doc.
|
|
4
4
|
author: Joshua Levy (github.com/jlevy) with LLM assistance
|
|
5
5
|
---
|
|
6
6
|
# Common Documentation Guidelines
|
|
@@ -219,7 +219,7 @@ Stylistically, emphasize **clarity**, **depth**, **rigor**, and **warmth**.
|
|
|
219
219
|
|
|
220
220
|
- **Auto-formatting:** Always use auto-formatting on every file type that supports it.
|
|
221
221
|
Defer to the language- or format-specific rules for exact style.
|
|
222
|
-
- **Emojis:** Do not use emojis gratuitously
|
|
222
|
+
- **Emojis:** Do not use emojis gratuitously—only when they add clarity through a
|
|
223
223
|
consistent semantic vocabulary.
|
|
224
224
|
Use ✅ and ❌ for success and failure (or ✔︎ and ✘ if the codebase already uses them),
|
|
225
225
|
and ⚠️ and ‼️ for user-facing warnings and errors (or ∆ and ‼︎ to match an existing
|
|
@@ -75,25 +75,25 @@ This research synthesizes information from:
|
|
|
75
75
|
|
|
76
76
|
### Primary Sources
|
|
77
77
|
|
|
78
|
-
- [Convex Production Limits](https://docs.convex.dev/production/state/limits)
|
|
78
|
+
- [Convex Production Limits](https://docs.convex.dev/production/state/limits)—Official
|
|
79
79
|
limits documentation
|
|
80
80
|
|
|
81
|
-
- [Convex Best Practices](https://docs.convex.dev/understanding/best-practices)
|
|
82
|
-
|
|
81
|
+
- [Convex Best Practices](https://docs.convex.dev/understanding/best-practices)—Official
|
|
82
|
+
best practices guide
|
|
83
83
|
|
|
84
|
-
- [Indexes and Query Performance](https://docs.convex.dev/database/reading-data/indexes)
|
|
85
|
-
|
|
84
|
+
- [Indexes and Query Performance](https://docs.convex.dev/database/reading-data/indexes)—Index
|
|
85
|
+
optimization guide
|
|
86
86
|
|
|
87
|
-
- [Pagination Guide](https://docs.convex.dev/database/pagination)
|
|
87
|
+
- [Pagination Guide](https://docs.convex.dev/database/pagination)—Official pagination
|
|
88
88
|
patterns
|
|
89
89
|
|
|
90
|
-
- [Queries that Scale](https://stack.convex.dev/queries-that-scale)
|
|
90
|
+
- [Queries that Scale](https://stack.convex.dev/queries-that-scale)—Community best
|
|
91
91
|
practices
|
|
92
92
|
|
|
93
|
-
- [Convex Aggregate Component](https://github.com/get-convex/aggregate)
|
|
93
|
+
- [Convex Aggregate Component](https://github.com/get-convex/aggregate)—Official
|
|
94
94
|
aggregation library
|
|
95
95
|
|
|
96
|
-
- [Convex Helpers](https://github.com/get-convex/convex-helpers)
|
|
96
|
+
- [Convex Helpers](https://github.com/get-convex/convex-helpers)—Additional utilities
|
|
97
97
|
for pagination and queries
|
|
98
98
|
|
|
99
99
|
* * *
|
|
@@ -503,17 +503,17 @@ basis … Usually this is only needed if your product has highly bursty traffic.
|
|
|
503
503
|
|
|
504
504
|
**Sources**:
|
|
505
505
|
|
|
506
|
-
- [Convex Runtimes](https://docs.convex.dev/functions/runtimes)
|
|
506
|
+
- [Convex Runtimes](https://docs.convex.dev/functions/runtimes)—Runtime comparison and
|
|
507
507
|
`"use node";` directive
|
|
508
508
|
|
|
509
|
-
- [Convex Actions](https://docs.convex.dev/functions/actions)
|
|
510
|
-
|
|
509
|
+
- [Convex Actions](https://docs.convex.dev/functions/actions)—Action limits and runtime
|
|
510
|
+
selection
|
|
511
511
|
|
|
512
|
-
- [Convex Limits](https://docs.convex.dev/production/state/limits)
|
|
512
|
+
- [Convex Limits](https://docs.convex.dev/production/state/limits)—Official limits
|
|
513
513
|
documentation
|
|
514
514
|
|
|
515
|
-
- [Convex Contact](https://docs.convex.dev/production/contact)
|
|
516
|
-
|
|
515
|
+
- [Convex Contact](https://docs.convex.dev/production/contact)—Support contact for limit
|
|
516
|
+
increases (support@convex.dev)
|
|
517
517
|
|
|
518
518
|
### 4. Storage and Bandwidth Quotas
|
|
519
519
|
|
|
@@ -1402,8 +1402,8 @@ export UDF_EXECUTOR_OCC_MAX_BACKOFF_MS=5000
|
|
|
1402
1402
|
|
|
1403
1403
|
- [Convex Aggregate Component](https://github.com/get-convex/aggregate)
|
|
1404
1404
|
|
|
1405
|
-
- [@convex-dev/workpool](https://www.npmjs.com/package/@convex-dev/workpool)
|
|
1406
|
-
|
|
1405
|
+
- [@convex-dev/workpool](https://www.npmjs.com/package/@convex-dev/workpool)—“you should
|
|
1406
|
+
ensure that each step is an idempotent Convex action”
|
|
1407
1407
|
|
|
1408
1408
|
- Source: `crates/common/src/knobs.rs:146-155`
|
|
1409
1409
|
|
|
@@ -1787,7 +1787,7 @@ export const processData = internalAction({
|
|
|
1787
1787
|
|
|
1788
1788
|
**Sources**:
|
|
1789
1789
|
|
|
1790
|
-
- [Convex Actions Documentation](https://docs.convex.dev/functions/actions)
|
|
1790
|
+
- [Convex Actions Documentation](https://docs.convex.dev/functions/actions)—Section on
|
|
1791
1791
|
awaiting promises
|
|
1792
1792
|
|
|
1793
1793
|
### Pitfall 10: Nested Same-Runtime Action Calls ✅
|
|
@@ -2067,47 +2067,47 @@ problematic nested same-runtime pattern.
|
|
|
2067
2067
|
|
|
2068
2068
|
### Official Convex Documentation
|
|
2069
2069
|
|
|
2070
|
-
- [Convex Production Limits](https://docs.convex.dev/production/state/limits)
|
|
2070
|
+
- [Convex Production Limits](https://docs.convex.dev/production/state/limits)—Complete
|
|
2071
2071
|
limits reference (verified January 2026)
|
|
2072
2072
|
|
|
2073
|
-
- [Convex Pricing](https://www.convex.dev/pricing)
|
|
2073
|
+
- [Convex Pricing](https://www.convex.dev/pricing)—Current plan limits and pricing
|
|
2074
2074
|
|
|
2075
|
-
- [Convex Best Practices](https://docs.convex.dev/understanding/best-practices)
|
|
2076
|
-
|
|
2075
|
+
- [Convex Best Practices](https://docs.convex.dev/understanding/best-practices)—Official
|
|
2076
|
+
best practices guide
|
|
2077
2077
|
|
|
2078
|
-
- [Convex Runtimes](https://docs.convex.dev/functions/runtimes)
|
|
2078
|
+
- [Convex Runtimes](https://docs.convex.dev/functions/runtimes)—Runtime comparison
|
|
2079
2079
|
(Convex vs Node.js)
|
|
2080
2080
|
|
|
2081
|
-
- [Indexes and Query Performance](https://docs.convex.dev/database/reading-data/indexes)
|
|
2082
|
-
|
|
2081
|
+
- [Indexes and Query Performance](https://docs.convex.dev/database/reading-data/indexes)—Index
|
|
2082
|
+
optimization and query patterns
|
|
2083
2083
|
|
|
2084
|
-
- [Pagination Guide](https://docs.convex.dev/database/pagination)
|
|
2084
|
+
- [Pagination Guide](https://docs.convex.dev/database/pagination)—Cursor-based and
|
|
2085
2085
|
offset pagination
|
|
2086
2086
|
|
|
2087
|
-
- [Query Functions](https://docs.convex.dev/functions/query-functions)
|
|
2088
|
-
|
|
2087
|
+
- [Query Functions](https://docs.convex.dev/functions/query-functions)—Query design and
|
|
2088
|
+
patterns
|
|
2089
2089
|
|
|
2090
|
-
- [Full Text Search](https://docs.convex.dev/search/text-search)
|
|
2090
|
+
- [Full Text Search](https://docs.convex.dev/search/text-search)—Search index limits
|
|
2091
2091
|
|
|
2092
|
-
- [Vector Search](https://docs.convex.dev/search/vector-search)
|
|
2092
|
+
- [Vector Search](https://docs.convex.dev/search/vector-search)—Vector index limits
|
|
2093
2093
|
|
|
2094
|
-
- [Scheduled Functions](https://docs.convex.dev/scheduling/scheduled-functions)
|
|
2095
|
-
|
|
2094
|
+
- [Scheduled Functions](https://docs.convex.dev/scheduling/scheduled-functions)—Scheduling
|
|
2095
|
+
limits
|
|
2096
2096
|
|
|
2097
|
-
- [Environment Variables](https://docs.convex.dev/production/environment-variables)
|
|
2098
|
-
|
|
2097
|
+
- [Environment Variables](https://docs.convex.dev/production/environment-variables)—Environment
|
|
2098
|
+
variable limits
|
|
2099
2099
|
|
|
2100
2100
|
### Community Resources
|
|
2101
2101
|
|
|
2102
|
-
- [Queries that Scale](https://stack.convex.dev/queries-that-scale)
|
|
2103
|
-
|
|
2102
|
+
- [Queries that Scale](https://stack.convex.dev/queries-that-scale)—Community article on
|
|
2103
|
+
scalable query patterns (February 2024)
|
|
2104
2104
|
|
|
2105
2105
|
### Official Libraries and Tools
|
|
2106
2106
|
|
|
2107
|
-
- [Convex Aggregate Component](https://github.com/get-convex/aggregate)
|
|
2108
|
-
|
|
2107
|
+
- [Convex Aggregate Component](https://github.com/get-convex/aggregate)—Official library
|
|
2108
|
+
for maintaining denormalized aggregates
|
|
2109
2109
|
|
|
2110
|
-
- [Convex Helpers](https://github.com/get-convex/convex-helpers)
|
|
2110
|
+
- [Convex Helpers](https://github.com/get-convex/convex-helpers)—Utilities for
|
|
2111
2111
|
pagination, filtering, and common patterns
|
|
2112
2112
|
|
|
2113
2113
|
* * *
|
|
@@ -3,9 +3,9 @@ title: Convex Rules
|
|
|
3
3
|
description: Guidelines and best practices for building Convex projects, including database schema design, queries, mutations, and real-world examples
|
|
4
4
|
author: Convex team
|
|
5
5
|
---
|
|
6
|
-
# Convex
|
|
6
|
+
# Convex Guidelines
|
|
7
7
|
|
|
8
|
-
## Function
|
|
8
|
+
## Function Guidelines
|
|
9
9
|
|
|
10
10
|
### New function syntax
|
|
11
11
|
|
|
@@ -265,7 +265,7 @@ Note: `paginationOpts` is an object with the following properties:
|
|
|
265
265
|
continueCursor (a string that represents the cursor to use to fetch the next page of
|
|
266
266
|
documents)
|
|
267
267
|
|
|
268
|
-
## Validator
|
|
268
|
+
## Validator Guidelines
|
|
269
269
|
|
|
270
270
|
- `v.bigint()` is deprecated for representing signed 64-bit integers.
|
|
271
271
|
Use `v.int64()` instead.
|
|
@@ -273,7 +273,7 @@ Note: `paginationOpts` is an object with the following properties:
|
|
|
273
273
|
- Use `v.record()` for defining a record type.
|
|
274
274
|
`v.map()` and `v.set()` are not supported.
|
|
275
275
|
|
|
276
|
-
## Schema
|
|
276
|
+
## Schema Guidelines
|
|
277
277
|
|
|
278
278
|
- Always define your schema in `convex/schema.ts`.
|
|
279
279
|
|
|
@@ -292,7 +292,7 @@ Note: `paginationOpts` is an object with the following properties:
|
|
|
292
292
|
If you want to be able to query by “field1” then “field2” and by “field2” then
|
|
293
293
|
“field1”, you must create separate indexes.
|
|
294
294
|
|
|
295
|
-
##
|
|
295
|
+
## TypeScript Guidelines
|
|
296
296
|
|
|
297
297
|
- You can use the helper typescript type `Id` imported from ‘./\_generated/dataModel’ to
|
|
298
298
|
get the type of the id for a given table.
|
|
@@ -341,7 +341,7 @@ export const exampleQuery = query({
|
|
|
341
341
|
- Always add `@types/node` to your `package.json` when using any Node.js built-in
|
|
342
342
|
modules.
|
|
343
343
|
|
|
344
|
-
## Full
|
|
344
|
+
## Full Text Search Guidelines
|
|
345
345
|
|
|
346
346
|
- A query for “10 messages in channel ‘#general’ that best match the query ‘hello hi’ in
|
|
347
347
|
their body” would look like:
|
|
@@ -349,7 +349,7 @@ export const exampleQuery = query({
|
|
|
349
349
|
const messages = await ctx.db .query("messages") .withSearchIndex("search_body", (q) =>
|
|
350
350
|
q.search("body", “hello hi”).eq("channel", “#general”), ) .take(10);
|
|
351
351
|
|
|
352
|
-
## Query
|
|
352
|
+
## Query Guidelines
|
|
353
353
|
|
|
354
354
|
- Do NOT use `filter` in queries.
|
|
355
355
|
Instead, define an index in the schema and use `withIndex` instead.
|
|
@@ -374,7 +374,7 @@ q.search("body", “hello hi”).eq("channel", “#general”), ) .take(10);
|
|
|
374
374
|
- Document queries that use indexes will be ordered based on the columns in the index
|
|
375
375
|
and can avoid slow table scans.
|
|
376
376
|
|
|
377
|
-
## Mutation
|
|
377
|
+
## Mutation Guidelines
|
|
378
378
|
|
|
379
379
|
- Use `ctx.db.replace` to fully replace an existing document.
|
|
380
380
|
This method will throw an error if the document does not exist.
|
|
@@ -382,7 +382,7 @@ q.search("body", “hello hi”).eq("channel", “#general”), ) .take(10);
|
|
|
382
382
|
- Use `ctx.db.patch` to shallow merge updates into an existing document.
|
|
383
383
|
This method will throw an error if the document does not exist.
|
|
384
384
|
|
|
385
|
-
## Action
|
|
385
|
+
## Action Guidelines
|
|
386
386
|
|
|
387
387
|
- Always add `"use node";` to the top of files containing actions that use Node.js
|
|
388
388
|
built-in modules.
|
|
@@ -405,7 +405,7 @@ export const exampleAction = action({
|
|
|
405
405
|
});
|
|
406
406
|
```
|
|
407
407
|
|
|
408
|
-
## Scheduling
|
|
408
|
+
## Scheduling Guidelines
|
|
409
409
|
|
|
410
410
|
### Cron guidelines
|
|
411
411
|
|
|
@@ -445,7 +445,7 @@ export default crons;
|
|
|
445
445
|
- If a cron calls an internal function, always import the `internal` object from
|
|
446
446
|
‘\_generated/api’, even if the internal function is registered in the same file.
|
|
447
447
|
|
|
448
|
-
## File
|
|
448
|
+
## File Storage Guidelines
|
|
449
449
|
|
|
450
450
|
- Convex includes file storage for large files like images, videos, and PDFs.
|
|
451
451
|
|
|
@@ -485,7 +485,7 @@ export const exampleQuery = query({
|
|
|
485
485
|
- Convex storage stores items as `Blob` objects.
|
|
486
486
|
You must convert all items to/from a `Blob` when using Convex storage.
|
|
487
487
|
|
|
488
|
-
# Examples
|
|
488
|
+
# Examples
|
|
489
489
|
|
|
490
490
|
## Example: chat-app
|
|
491
491
|
|
|
@@ -899,7 +899,7 @@ export default function App() {
|
|
|
899
899
|
}
|
|
900
900
|
```
|
|
901
901
|
|
|
902
|
-
## Additional
|
|
902
|
+
## Additional Guidelines
|
|
903
903
|
|
|
904
904
|
(These are added to the original Convex rules above.)
|
|
905
905
|
|
|
@@ -13,11 +13,11 @@ lightweight alternatives.
|
|
|
13
13
|
|
|
14
14
|
This guideline is organized in three parts:
|
|
15
15
|
|
|
16
|
-
1. **Part 1: Verified Facts
|
|
17
|
-
|
|
18
|
-
2. **Part 2: Third-Party Perspectives
|
|
16
|
+
1. **Part 1: Verified Facts**—Technical details verified through direct testing, source
|
|
17
|
+
code analysis, and documented issue reports
|
|
18
|
+
2. **Part 2: Third-Party Perspectives**—Community opinions and blog posts, clearly
|
|
19
19
|
marked as such
|
|
20
|
-
3. **Part 3: Analysis and Recommendations
|
|
20
|
+
3. **Part 3: Analysis and Recommendations**—Decision frameworks and recommendations
|
|
21
21
|
based on available evidence, with explicit uncertainty acknowledgment
|
|
22
22
|
|
|
23
23
|
## Research Methodology
|
|
@@ -605,8 +605,8 @@ Building a desktop app involves three separate decisions:
|
|
|
605
605
|
|
|
606
606
|
1. **Framework/runtime**: Electron vs Electrobun (vs Tauri, etc.)
|
|
607
607
|
2. **Package manager**: npm vs pnpm vs Bun (as a toolchain)
|
|
608
|
-
3. **Packaging
|
|
609
|
-
pipeline
|
|
608
|
+
3. **Packaging and updates**: electron-builder vs electron-forge vs Electrobun’s
|
|
609
|
+
built-in pipeline
|
|
610
610
|
|
|
611
611
|
The sections below address these decisions, starting with package manager choice for
|
|
612
612
|
Electron apps, then framework choice (Electron vs Electrobun).
|
|
@@ -792,18 +792,18 @@ Avoid `unsafe-eval` and `unsafe-inline`.
|
|
|
792
792
|
- [Bun #1588: Electron failed to install correctly](https://github.com/oven-sh/bun/issues/1588)
|
|
793
793
|
- [electron-forge #3906: Use bun when bunx is used](https://github.com/electron/forge/issues/3906)
|
|
794
794
|
(April 2025)
|
|
795
|
-
- [Quasar #17085: Electron build error with Bun and pnpm](https://github.com/quasarframework/quasar/issues/17085)
|
|
796
|
-
|
|
795
|
+
- [Quasar #17085: Electron build error with Bun and pnpm](https://github.com/quasarframework/quasar/issues/17085)—Fixed
|
|
796
|
+
in Quasar v1.8.5, v2.0.0-beta.11, v3.12.8, v4.0.0-beta.12
|
|
797
797
|
|
|
798
798
|
### GitHub Issue Reports (Electrobun)
|
|
799
799
|
|
|
800
800
|
- [Bun #24876: Crash on MacBook Pro M2 Pro](https://github.com/oven-sh/bun/issues/24876)
|
|
801
|
-
(November 2025)
|
|
801
|
+
(November 2025)—Closed as duplicate; resolved in Electrobun 0.1.21-beta.0+
|
|
802
802
|
|
|
803
803
|
### GitHub Discussions
|
|
804
804
|
|
|
805
|
-
- [Bun #790: Desktop support (Electron replacement)](https://github.com/oven-sh/bun/discussions/790)
|
|
806
|
-
|
|
805
|
+
- [Bun #790: Desktop support (Electron replacement)](https://github.com/oven-sh/bun/discussions/790)—Community
|
|
806
|
+
discussion on Bun desktop app support
|
|
807
807
|
|
|
808
808
|
### Community Resources (Stack Overflow)
|
|
809
809
|
|
|
@@ -819,22 +819,22 @@ Avoid `unsafe-eval` and `unsafe-inline`.
|
|
|
819
819
|
|
|
820
820
|
### Blog Posts and News (Third-Party Opinions)
|
|
821
821
|
|
|
822
|
-
- [Why We Ditched Node for Bun in 2026](https://dev.to/rayenmabrouk/why-we-ditched-node-for-bun-in-2026-and-why-you-should-too-48kg)
|
|
823
|
-
|
|
822
|
+
- [Why We Ditched Node for Bun in 2026](https://dev.to/rayenmabrouk/why-we-ditched-node-for-bun-in-2026-and-why-you-should-too-48kg)—Opinion
|
|
823
|
+
piece
|
|
824
824
|
- [Electrobun on Hacker News](https://news.ycombinator.com/item?id=42199486)
|
|
825
825
|
- [Electrobun on Brian Lovin’s HN](https://brianlovin.com/hn/42199486)
|
|
826
826
|
|
|
827
827
|
### Anthropic/Bun Acquisition (Primary Sources)
|
|
828
828
|
|
|
829
|
-
- [Anthropic acquires Bun as Claude Code reaches $1B milestone](https://www.anthropic.com/news/anthropic-acquires-bun-as-claude-code-reaches-usd1b-milestone)
|
|
830
|
-
|
|
831
|
-
- [Bun is joining Anthropic](https://bun.com/blog/bun-joins-anthropic)
|
|
829
|
+
- [Anthropic acquires Bun as Claude Code reaches $1B milestone](https://www.anthropic.com/news/anthropic-acquires-bun-as-claude-code-reaches-usd1b-milestone)—Official
|
|
830
|
+
Anthropic announcement (December 3, 2025)
|
|
831
|
+
- [Bun is joining Anthropic](https://bun.com/blog/bun-joins-anthropic)—Bun’s
|
|
832
832
|
announcement (December 2, 2025)
|
|
833
833
|
|
|
834
834
|
### Other Bug Reports
|
|
835
835
|
|
|
836
|
-
- [Launchpad #1944468: Electron applications all crash upon launch](https://bugs.launchpad.net/bugs/1944468)
|
|
837
|
-
|
|
836
|
+
- [Launchpad #1944468: Electron applications all crash upon launch](https://bugs.launchpad.net/bugs/1944468)—Ubuntu-specific
|
|
837
|
+
Electron issues
|
|
838
838
|
|
|
839
839
|
<!-- This document follows common-doc-guidelines.md.
|
|
840
840
|
See github.com/jlevy/practical-prose and review guidelines before editing.
|
|
@@ -41,7 +41,7 @@ These are language-agnostic rules on comments:
|
|
|
41
41
|
NEVER DO THIS: “// Step 3: Fetch the data from the cache”\
|
|
42
42
|
This is fine: “// Now fetch the data from the cache”
|
|
43
43
|
|
|
44
|
-
- DO NOT use emojis or special unicode characters like ① or • or – or
|
|
44
|
+
- DO NOT use emojis or special unicode characters like ① or • or – or—in comments.
|
|
45
45
|
|
|
46
46
|
- DO NOT leave comments about code changes that have been completed.
|
|
47
47
|
DO NOT leave comments like:
|
|
@@ -106,13 +106,13 @@ Always run all the tests (except long-running tests) each time.
|
|
|
106
106
|
|
|
107
107
|
Tests in the project are broken down into three types:
|
|
108
108
|
|
|
109
|
-
1. Unit
|
|
109
|
+
1. Unit—fast, focused tests for small units of business logic
|
|
110
110
|
|
|
111
111
|
- No network/web access
|
|
112
112
|
|
|
113
113
|
- Typically part of CI builds.
|
|
114
114
|
|
|
115
|
-
2. Integration
|
|
115
|
+
2. Integration—tests that exercise multiple components efficiently
|
|
116
116
|
|
|
117
117
|
- Mock external APIs
|
|
118
118
|
|
|
@@ -122,7 +122,7 @@ Tests in the project are broken down into three types:
|
|
|
122
122
|
|
|
123
123
|
- File names end with integration.test.ts
|
|
124
124
|
|
|
125
|
-
3. Golden
|
|
125
|
+
3. Golden—tests that check behavior in a fine-grained way across known “golden”
|
|
126
126
|
scenarios
|
|
127
127
|
|
|
128
128
|
- These are an essential type of test that is often neglected but very powerful!
|
|
@@ -141,7 +141,7 @@ Tests in the project are broken down into three types:
|
|
|
141
141
|
|
|
142
142
|
- Typicaly part of CI builds as long as they are fast enough.
|
|
143
143
|
|
|
144
|
-
4. E2E
|
|
144
|
+
4. E2E—tests of real system behavior with live APIs.
|
|
145
145
|
Are not run on every commit as they can have costs or side effects or be slow.
|
|
146
146
|
Requires all API keys.
|
|
147
147
|
File names end with e2e.test.ts
|
|
@@ -7,7 +7,7 @@ author: Joshua Levy (github.com/jlevy) with LLM assistance
|
|
|
7
7
|
|
|
8
8
|
**Related**: `tbd guidelines general-tdd-guidelines`
|
|
9
9
|
|
|
10
|
-
## TL;DR (What to
|
|
10
|
+
## TL;DR (What to Do)
|
|
11
11
|
|
|
12
12
|
- Define a session schema (events) with stable vs unstable fields.
|
|
13
13
|
|
|
@@ -130,11 +130,11 @@ npx tryscript@latest --help # CLI options
|
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
**Key syntax** (see `tryscript docs` for complete reference):
|
|
133
|
-
- `$ command
|
|
134
|
-
- `? N
|
|
135
|
-
- `[..]
|
|
136
|
-
-
|
|
137
|
-
- `[PATTERN]
|
|
133
|
+
- `$ command`—command to run
|
|
134
|
+
- `? N`—expected exit code (default 0)
|
|
135
|
+
- `[..]`—matches any text on a single line
|
|
136
|
+
- `...`—matches zero or more complete lines
|
|
137
|
+
- `[PATTERN]`—custom regex patterns defined in YAML frontmatter
|
|
138
138
|
|
|
139
139
|
This guideline does not duplicate tryscript’s documentation.
|
|
140
140
|
For pattern syntax, YAML frontmatter options, sandbox configuration, and advanced
|
|
@@ -475,11 +475,11 @@ The developer workflow for golden tests:
|
|
|
475
475
|
|
|
476
476
|
1. **Make changes**: Modify business logic, fix bugs, add features
|
|
477
477
|
|
|
478
|
-
2. **Run tests**: `pnpm test:golden
|
|
478
|
+
2. **Run tests**: `pnpm test:golden`—tests fail if behavior changed
|
|
479
479
|
|
|
480
|
-
3. **Regenerate**: `pnpm test:golden --update
|
|
480
|
+
3. **Regenerate**: `pnpm test:golden --update`—update golden files
|
|
481
481
|
|
|
482
|
-
4. **Review diffs**: `git diff tests/golden
|
|
482
|
+
4. **Review diffs**: `git diff tests/golden/`—verify changes are intentional
|
|
483
483
|
|
|
484
484
|
5. **Commit**: Session files committed alongside code changes
|
|
485
485
|
|