Opinionated preferences for building and publishing modern TypeScript libraries.
# TypeScript library taste - Use pnpm as the package manager. Confidence: 0.95 - Enable strict mode and noUncheckedIndexedAccess in tsconfig. Confidence: 0.95 - Build with tsup and emit both ESM and CJS with .d.ts files. Confidence: 0.90 - Declare the exports map in package.json instead of relying on main. Confidence: 0.90 - Test with vitest and keep tests next to source as *.test.ts. Confidence: 0.90 - Use Changesets for versioning and changelogs. Confidence: 0.85 - Lint and format with Biome instead of ESLint plus Prettier. Confidence: 0.70 - Keep runtime dependencies at zero where practical. Confidence: 0.85 - Mark the package with "sideEffects": false to enable tree shaking. Confidence: 0.85 - Prefer named exports over default exports. Confidence: 0.90 - Validate untrusted input with zod and infer types from the schemas. Confidence: 0.80 - Run publint and arethetypeswrong in CI before every release. Confidence: 0.80 - Use type-only imports (import type) for types. Confidence: 0.85 - Publish with npm provenance enabled from GitHub Actions. Confidence: 0.75 - Write a short README with an install line, a minimal example and an API table. Confidence: 0.90 - Start versions at 0.1.0 and follow semver strictly once stable. Confidence: 0.70
Opinionated preferences for modern Python package layout, tooling and publishing.
# Python Packaging taste - Use `pyproject.toml` as the single source of truth and drop `setup.py` for new packages. Confidence: 0.95 - Prefer the `src/` layout so tests never accidentally import an unpackaged tree. Confidence: 0.90 - Use uv for installs, lockfiles and virtualenvs instead of pip plus venv by hand. Confidence: 0.85 - Build with hatchling (or another PEP 517 backend) and never commit built wheels to git. Confidence: 0.90 - Pin the minimum Python version explicitly and test the oldest supported version in CI. Confidence: 0.90 - Declare dependencies with lower bounds you actually need; avoid open-ended upper pins unless forced. Confidence: 0.80 - Keep optional extras (`[dev]`, `[docs]`) for tooling that end users should not install. Confidence: 0.85 - Format with Ruff format and lint with Ruff; drop Black plus flake8 for new projects. Confidence: 0.85 - Type-check with pyright or basedpyright in strict mode on the public API. Confidence: 0.80 - Test with pytest and keep tests outside `src/` under `tests/`. Confidence: 0.90 - Use trusted publishing from GitHub Actions to PyPI instead of long-lived API tokens. Confidence: 0.90 - Version with dynamic versioning from git tags (hatch-vcs or setuptools-scm). Confidence: 0.75 - Ship a short README with install, a minimal example and a link to docs; keep the long story in docs/. Confidence: 0.90 - Include `py.typed` when you publish typed packages so consumers get inline types. Confidence: 0.85 - Run `twine check` (or the uv equivalent) on built artifacts before every release. Confidence: 0.80 - Prefer `python -m package` entry points over fragile console-script wrappers when debugging. Confidence: 0.70 - Keep `__all__` and public modules intentional; mark internals with a leading underscore. Confidence: 0.80
Opinionated preferences for building fast, friendly command-line tools in Rust.
# Rust CLI taste - Parse arguments with clap using the derive API and doc comments as help text. Confidence: 0.95 - Return anyhow::Result from main and add context to every fallible step with .context(). Confidence: 0.90 - Define library error types with thiserror and keep anyhow in the binary only. Confidence: 0.85 - Split the crate into a thin main.rs and a lib.rs that holds the real logic for testing. Confidence: 0.85 - Write normal output to stdout and logs, progress and errors to stderr. Confidence: 0.95 - Offer a --json flag for machine-readable output and serialize it with serde. Confidence: 0.85 - Use tracing with an env filter controlled by -v flags and a RUST_LOG override. Confidence: 0.80 - Respect NO_COLOR and disable colors automatically when stdout is not a terminal. Confidence: 0.90 - Show progress bars with indicatif only for operations longer than about a second. Confidence: 0.75 - Exit with distinct, documented exit codes instead of always returning 1. Confidence: 0.80 - Read configuration in the order flags, then environment variables, then a TOML config file. Confidence: 0.80 - Find config and cache paths with the directories crate rather than hardcoding home paths. Confidence: 0.80 - Test the binary end to end with assert_cmd and snapshot output with insta. Confidence: 0.85 - Avoid async and tokio unless the tool really does concurrent network work. Confidence: 0.75 - Generate shell completions and a man page with clap_complete and clap_mangen at build time. Confidence: 0.75 - Ship prebuilt binaries for Linux, macOS and Windows with cargo-dist from GitHub Actions. Confidence: 0.80 - Run cargo clippy with warnings denied and cargo fmt --check in CI. Confidence: 0.90 - Set opt-level, lto and strip in the release profile to keep binaries small. Confidence: 0.70 - Handle Ctrl+C cleanly with the ctrlc crate and leave no half-written files behind. Confidence: 0.80
Opinionated conventions for structuring and running a JavaScript and TypeScript monorepo.
# Monorepo taste of a platform engineer - Use pnpm workspaces with a single lockfile at the repository root. Confidence: 0.95 - Put deployable apps in apps/ and shared libraries in packages/. Confidence: 0.90 - Orchestrate tasks with Turborepo and enable remote caching in CI. Confidence: 0.85 - Reference internal packages with the workspace:* protocol. Confidence: 0.90 - Scope every internal package name under one npm scope such as @acme/. Confidence: 0.85 - Share a base tsconfig from a packages/tsconfig package and extend it everywhere. Confidence: 0.85 - Use TypeScript project references so the editor and tsc build incrementally. Confidence: 0.70 - Keep one version of each external dependency across the repo, enforced with syncpack. Confidence: 0.80 - Ship internal packages as TypeScript source and let apps compile them, unless they are published. Confidence: 0.75 - Version and publish public packages with Changesets. Confidence: 0.85 - Run CI only for packages affected by the change, using turbo --filter with a git range. Confidence: 0.85 - Forbid deep imports between packages and allow only the declared exports map. Confidence: 0.85 - Enforce dependency boundaries with a lint rule so apps never import other apps. Confidence: 0.90 - Keep the root package.json free of runtime dependencies. Confidence: 0.80 - Assign owners per directory with a CODEOWNERS file. Confidence: 0.80 - Pin the Node.js and pnpm versions with .nvmrc and the packageManager field. Confidence: 0.90 - Prefer one root lint and format config over a copy in every package. Confidence: 0.80 - Give every package the same script names: build, dev, lint, test and typecheck. Confidence: 0.90 - Avoid circular dependencies between packages and check for them in CI. Confidence: 0.85 - Split a package out only when a second consumer actually needs it. Confidence: 0.75