FactoryWager Wiki

Development Standards — Quick Reference

Full: .custom-instructions.md · Agents: AGENTS.md · Wire: WIRE_BOUNDARY.md · Install: UNIFIED.md

Terminology

Prefer Avoid
artifact “codebase” (for delivered/proven things)
repository / source tree “codebase” (for location)
brand bare string domain IDs

Domain IDs (mandatory)

Parse once at the boundary. No sessionId: string / bare id: string without // brand-ok.

Boundary Constructor
Wire parseXId(unknown)
Optional tryXId(...)
Trusted asXId(string)
bun tools/brand-catalog.ts
bun run check:brands:all

Console output (structured dumps)

Use the lib/console-depth.ts helpers for object/table output — inspect / logDepth / logTable / stripANSI — not raw console.log(obj), console.table, or JSON.stringify(x, null, 2) as default human output (--json branches excepted). Depth SSOT: bunfig.toml [console] depth = 6; local override BUN_CONSOLE_DEPTH (wrapper-only). Details: root AGENTS.md “Console depth”.

Everyday

bun run install:verify
bun run type-check
bun run test:changed
bun run lint:harness
bun run harness:status
bun tools/bun-doc-refs.ts suggest "Bun.secrets"

Before merge

Map: docs/README.md · brands: lib/types/branded/README.md.