Opinionated conventions for keyboard-first terminal UI apps: TUI frameworks, responsive rendering, accessible colors and scriptable modes.
# Terminal UI App taste of a developer who builds fast, keyboard-first terminal interfaces - Pick a mature TUI framework (Bubble Tea, Ratatui, Textual, Ink) instead of writing raw escape codes. Confidence: 0.90 - Use an Elm-style model, update and view architecture so state changes are easy to test without a terminal. Confidence: 0.80 - Render in the alternate screen buffer and always restore the terminal on exit, panic or Ctrl+C. Confidence: 0.95 - Make every action reachable by keyboard and show the main shortcuts in a footer bar. Confidence: 0.90 - Offer a ? key that opens a full help overlay listing all key bindings for the current view. Confidence: 0.85 - Support both arrow keys and vim-style hjkl navigation, and never require a mouse, though mouse support is welcome. Confidence: 0.80 - Use q or Esc to go back or quit, and ask for confirmation only before destructive actions. Confidence: 0.85 - Never block the render loop on I/O; run network and disk work in the background and show a spinner or progress bar. Confidence: 0.90 - Redraw only on state changes or at a capped frame rate, not in a busy loop. Confidence: 0.80 - Handle terminal resize events and lay out with flexible constraints that still work at 80x24. Confidence: 0.90 - Respect NO_COLOR, detect color depth, and fall back gracefully from truecolor to 256 and 16 colors. Confidence: 0.85 - Never use color as the only signal; pair it with symbols, labels or bold text. Confidence: 0.85 - Use a small, consistent palette tied to the terminal theme instead of hard-coded bright colors. Confidence: 0.75 - Provide a non-interactive mode (flags, --json output) for every important action so the tool works in scripts and CI. Confidence: 0.90 - Detect when stdout is not a TTY and switch to plain output automatically. Confidence: 0.90 - Add fuzzy filtering with / to any list longer than one screen. Confidence: 0.80 - Write logs to a file (opt-in with --debug), never to the screen the UI is drawing on. Confidence: 0.85 - Store config in the XDG config directory as TOML or YAML, and let users remap key bindings there. Confidence: 0.75 - Test views with golden snapshot files of rendered output at fixed terminal sizes. Confidence: 0.75 - Test in the common terminals (iTerm2, Windows Terminal, GNOME Terminal, tmux) before a release, including Unicode width cases. Confidence: 0.70 - Keep startup under about 100 ms so opening the app feels instant. Confidence: 0.70 - Ship a single static binary or a pipx/npm install path, with a short animated demo GIF in the README. Confidence: 0.70
Opinionated conventions for building and releasing Swift packages: Package.swift setup, strict concurrency, Swift Testing, DocC and semver.
# Swift Package taste of a developer who ships small, well-tested Swift libraries - Use Swift Package Manager as the only distribution method for new libraries, and skip CocoaPods and Carthage specs unless users ask. Confidence: 0.85 - Set the swift-tools-version to the oldest toolchain you really test on, and raise it on purpose in a minor release. Confidence: 0.80 - Declare explicit platform minimums in Package.swift (.iOS, .macOS, .watchOS, .tvOS, .visionOS) instead of relying on defaults. Confidence: 0.85 - Keep one focused library product per package; split optional integrations into separate targets users can opt into. Confidence: 0.80 - Use the standard layout (Sources/<Target>, Tests/<Target>Tests) and avoid custom path settings. Confidence: 0.90 - Enable Swift 6 language mode and strict concurrency checking, and mark public types Sendable where it is true. Confidence: 0.80 - Keep the public API small: default to internal, and make each public symbol a deliberate decision. Confidence: 0.90 - Prefer value types and protocols with small requirements over class hierarchies in public APIs. Confidence: 0.80 - Offer async/await APIs first, and add completion-handler or Combine wrappers only when users need them. Confidence: 0.75 - Avoid third-party dependencies in a library; when one is needed, use a version range from: a major version, never a branch or exact revision. Confidence: 0.85 - Write tests with Swift Testing (@Test, #expect) for new code and keep XCTest only where it is already used. Confidence: 0.75 - Run CI on macOS and Linux with swift build and swift test, plus xcodebuild for each Apple platform you claim to support. Confidence: 0.85 - Write DocC documentation for every public symbol and include at least one article showing the main use case. Confidence: 0.80 - Host the docs on the Swift Package Index and keep a .spi.yml so builds and documentation stay green there. Confidence: 0.70 - Follow semantic versioning with plain tags like 1.4.0, without a v prefix, so SPM resolves them. Confidence: 0.90 - Use @available and deprecation messages with a renamed: hint one minor release before removing an API. Confidence: 0.85 - Keep resources in a Resources folder declared with .process and access them only through Bundle.module. Confidence: 0.75 - Format with swift-format or SwiftFormat and lint with SwiftLint in CI, using a config committed to the repo. Confidence: 0.70 - Avoid build plugins and macros unless they remove real boilerplate, because they slow builds and need extra trust prompts. Confidence: 0.65 - Ship a privacy manifest (PrivacyInfo.xcprivacy) when the library touches required-reason APIs. Confidence: 0.75 - Keep Package.resolved out of library repositories, but commit it in apps and example projects. Confidence: 0.80 - Include a runnable example app or snippet in the README that compiles in CI. Confidence: 0.70 - Keep a CHANGELOG.md with Added, Changed, Deprecated and Fixed sections for every release. Confidence: 0.80
Opinionated preferences for designing and publishing Rust library crates: API shape, errors, features, docs and release checks.
# Rust Library Crate taste of a maintainer who publishes reusable crates - Keep the public API small and re-export the important types from the crate root. Confidence: 0.85 - Define one error enum per crate with `thiserror`, and never return `anyhow::Error` from a library. Confidence: 0.90 - Mark public enums and config structs `#[non_exhaustive]` when new variants or fields are likely. Confidence: 0.80 - Accept flexible inputs like `impl AsRef<str>` or `impl Into<String>` and return concrete types. Confidence: 0.80 - Use the builder pattern for types with more than a few optional settings. Confidence: 0.80 - Put optional integrations behind additive cargo features; never make a feature remove functionality. Confidence: 0.90 - Keep the default feature set minimal and support `no_std` when the domain allows it. Confidence: 0.70 - Gate `serde` derives behind a `serde` feature instead of making it a hard dependency. Confidence: 0.85 - Declare `rust-version` in Cargo.toml and test the MSRV in CI. Confidence: 0.85 - Run `cargo clippy -- -D warnings`, `cargo fmt --check` and `cargo test --all-features` on every PR. Confidence: 0.90 - Check semver breakage with `cargo-semver-checks` before each release. Confidence: 0.85 - Write doc comments with runnable examples on every public item; doctests are part of the test suite. Confidence: 0.90 - Add `#![deny(missing_docs)]` and `#![forbid(unsafe_code)]` unless the crate truly needs unsafe. Confidence: 0.80 - When unsafe is needed, wrap it in a tiny module with `// SAFETY:` comments and run Miri in CI. Confidence: 0.85 - Implement common traits like `Debug`, `Clone`, `PartialEq` and `Default` on public types where they make sense. Confidence: 0.85 - Make public types `Send` and `Sync` when possible and assert it in a test. Confidence: 0.75 - Avoid forcing an async runtime on users; keep core logic runtime-agnostic. Confidence: 0.80 - Add property tests with `proptest` for parsers and encoders. Confidence: 0.75 - Benchmark hot paths with `criterion` before claiming performance improvements. Confidence: 0.75 - Release with `cargo-release` or release-plz and keep a CHANGELOG.md in Keep a Changelog format. Confidence: 0.80 - Dual-license under MIT OR Apache-2.0 to match the Rust ecosystem. Confidence: 0.80
Opinionated preferences for building and publishing TypeScript libraries to npm: exports maps, type checks, releases and package hygiene.
# TypeScript Library Publishing taste of a maintainer who ships small, well-typed npm packages - Publish ESM first and add a CommonJS build only when real consumers still need `require()`. Confidence: 0.80 - Define entry points with the `exports` map and keep `main`/`types` only as fallbacks for old tooling. Confidence: 0.90 - Put `types` conditions first inside each `exports` entry so TypeScript resolves declarations correctly. Confidence: 0.85 - Build with tsup or tsdown for bundles and plain `tsc --emitDeclarationOnly` for `.d.ts` files. Confidence: 0.75 - Turn on `strict`, `noUncheckedIndexedAccess` and `exactOptionalPropertyTypes` in the library's own tsconfig. Confidence: 0.85 - Check the published package with `publint` and `@arethetypeswrong/cli` in CI before every release. Confidence: 0.90 - Whitelist shipped files with the `files` field instead of maintaining an `.npmignore`. Confidence: 0.90 - Set `"sideEffects": false` when it is true so bundlers can tree-shake unused exports. Confidence: 0.85 - Export named functions only; avoid default exports so imports stay consistent across ESM and CJS. Confidence: 0.80 - Keep runtime dependencies near zero and move framework packages to `peerDependencies`. Confidence: 0.90 - Declare a supported Node.js range in `engines` and test that range in a CI matrix. Confidence: 0.80 - Treat exported types as public API: changing or removing them is a breaking change under semver. Confidence: 0.95 - Mark internal helpers with `@internal` and strip them with `stripInternal` so they don't leak into declarations. Confidence: 0.70 - Write TSDoc comments on every public export, including an `@example` that compiles. Confidence: 0.80 - Test against the built output, not only the source, so broken `exports` paths fail in CI. Confidence: 0.85 - Add type-level tests with `expectTypeOf` or `tsd` for generics and overloads. Confidence: 0.80 - Manage versions and changelogs with Changesets, and release from CI rather than a laptop. Confidence: 0.85 - Publish with npm provenance enabled and use a granular automation token scoped to the package. Confidence: 0.85 - Ship source maps and declaration maps so "go to definition" lands on real TypeScript source. Confidence: 0.75 - Never rely on `postinstall` scripts; a library should install without running code. Confidence: 0.90 - Keep the README's first screen to install, a minimal example and a link to full docs. Confidence: 0.80
Opinionated ESLint and Prettier conventions for JavaScript and TypeScript teams that want consistent code and no style debates.
# Linting and Formatting taste of a JavaScript developer who wants zero style debates - Let Prettier own all formatting and ESLint own only correctness, so the two tools never fight over the same rule. Confidence: 0.90 - Use the ESLint flat config (`eslint.config.js`) for new projects and skip the legacy `.eslintrc` formats. Confidence: 0.85 - Turn off every stylistic ESLint rule with `eslint-config-prettier` instead of tuning them one by one. Confidence: 0.85 - Keep the Prettier config tiny and close to defaults; arguing about semicolons is not worth a meeting. Confidence: 0.90 - Commit the formatter and linter configs to the repo and pin their versions so every machine gives the same result. Confidence: 0.90 - Enable `typescript-eslint` with type-aware rules for TypeScript code, even though it makes linting a bit slower. Confidence: 0.80 - Treat `no-floating-promises` and `no-misused-promises` as errors; unhandled promises are real bugs, not style. Confidence: 0.85 - Prefer a short list of rules set to `error` over a long list of `warn` rules that everyone learns to ignore. Confidence: 0.85 - Run the formatter on save in the editor so formatting never shows up as a separate task. Confidence: 0.85 - Run lint and format checks on staged files only in a pre-commit hook with `lint-staged`, and keep that hook fast. Confidence: 0.75 - Run `prettier --check` and `eslint --max-warnings=0` in CI so nothing unformatted or noisy reaches the main branch. Confidence: 0.90 - Land the first repo-wide format in a single dedicated commit and add it to `.git-blame-ignore-revs`. Confidence: 0.80 - Allow inline `eslint-disable` comments only for one specific rule, always with a short reason next to it. Confidence: 0.85 - Never disable a rule for the whole file just to get one tricky line through. Confidence: 0.75 - Keep import sorting automatic with a plugin, so import order never comes up in code review. Confidence: 0.70 - Add a `.editorconfig` for line endings, final newlines and indentation so non-JS files stay consistent too. Confidence: 0.70 - Ignore generated code and build output in both tools instead of fixing lint errors in files nobody writes by hand. Confidence: 0.85 - Review new lint rules as a team decision with a one-line reason in the config, not as a drive-by change. Confidence: 0.70 - Consider Biome for new small projects that want one fast tool for both linting and formatting. Confidence: 0.60 - Fix lint errors in the same pull request that adds them; a "clean up lint later" ticket never gets done. Confidence: 0.80
Opinionated conventions for building maintainable, consistent UIs with Tailwind CSS.
# Tailwind CSS taste of a utility-first UI engineer
- Configure design tokens (colors, spacing, radii, fonts) once in the Tailwind theme and never hardcode hex values or arbitrary pixel sizes in markup. Confidence: 0.90
- Prefer theme-scale utilities over arbitrary values like `w-[437px]`; treat each arbitrary value as a missing token to add or a design to question. Confidence: 0.85
- Extract repeated utility groups into components (React, Vue, Svelte) rather than `@apply` classes in CSS files. Confidence: 0.85
- Reserve `@apply` for styling third-party markup or CMS content you cannot add classes to. Confidence: 0.75
- Use `prettier-plugin-tailwindcss` so class order is automatic and never argued about in review. Confidence: 0.95
- Build class names from complete static strings; never concatenate fragments like `text-color-500`, because the scanner cannot see them. Confidence: 0.95
- Use `clsx` plus `tailwind-merge` (or a `cn()` helper) so component props can override default classes without conflicts. Confidence: 0.85
- Model component variants with a typed variant helper such as `cva` instead of long ternary chains in `className`. Confidence: 0.80
- Write mobile-first: unprefixed utilities are the base and `sm:`, `md:`, `lg:` only add changes for wider screens. Confidence: 0.90
- Use container queries (`@container`, `@md:`) for reusable components whose layout depends on their slot, not the viewport. Confidence: 0.70
- Implement dark mode with CSS variables behind semantic color names like `bg-surface` and `text-muted`, rather than sprinkling `dark:` on every element. Confidence: 0.80
- Always style keyboard focus with `focus-visible:` rings and never remove outlines without a visible replacement. Confidence: 0.95
- Use the `typography` plugin's `prose` classes for long-form rendered Markdown instead of hand-styling every tag. Confidence: 0.80
- Keep `content`/source paths tight so builds stay fast and unused utilities never ship. Confidence: 0.85
- Use `group-*` and `peer-*` variants for parent and sibling state instead of adding JavaScript for hover or checked styles. Confidence: 0.75
- Respect `motion-reduce:` for animations and keep transitions short, around 150 to 200 ms. Confidence: 0.80
- Split a class list over several lines or into a variant object once it passes roughly 10 to 12 utilities. Confidence: 0.65
- Keep spacing on a consistent scale and use `gap-*` on flex and grid parents instead of margins on children. Confidence: 0.85
- Avoid `!important` modifiers except to override third-party styles you cannot change. Confidence: 0.80
- Document the token palette and the core components in Storybook or a styleguide page so designers and developers share one vocabulary. Confidence: 0.70Opinionated conventions for fast, type-safe frontend builds and tooling with Vite.
# Vite Frontend Tooling taste of a fast-feedback web developer - Start new single-page apps and component playgrounds on Vite with the official framework plugin instead of a custom webpack setup. Confidence: 0.85 - Keep `vite.config.ts` in TypeScript with `defineConfig`, and keep it short enough to read in one screen. Confidence: 0.80 - Run type checking separately with `tsc --noEmit` in CI and in a watcher, since Vite only strips types and never checks them. Confidence: 0.95 - Use path aliases sparingly, define them once in `tsconfig.json`, and mirror them in Vite with a plugin such as `vite-tsconfig-paths`. Confidence: 0.75 - Expose only `VITE_`-prefixed environment variables to client code and never put secrets in them. Confidence: 0.95 - Type `import.meta.env` in a `vite-env.d.ts` file so missing or misspelled variables fail at compile time. Confidence: 0.80 - Configure the dev server proxy for backend APIs instead of enabling permissive CORS on the backend just for local development. Confidence: 0.85 - Use Vitest for unit and component tests so tests share the same config, transforms and aliases as the app. Confidence: 0.90 - Lazy-load routes and heavy widgets with dynamic `import()` and let Rollup split chunks, rather than hand-tuning `manualChunks` early. Confidence: 0.80 - Inspect bundle size with `rollup-plugin-visualizer` before releases and treat a large new dependency as a review topic. Confidence: 0.75 - Import assets through the module graph so they get hashed file names, keeping `public/` for files that need fixed URLs like `robots.txt`. Confidence: 0.85 - Set an explicit `build.target` that matches the browsers you support, instead of relying on the default. Confidence: 0.70 - Generate source maps for production builds and upload them to your error tracker rather than serving them publicly. Confidence: 0.80 - Prefer native CSS features and CSS modules or Tailwind over heavy CSS-in-JS runtimes in Vite projects. Confidence: 0.70 - Keep the plugin list small and remove plugins that duplicate built-in features such as JSON imports or CSS handling. Confidence: 0.80 - Use `vite preview` to smoke-test the production build locally before deploying, since dev and build use different pipelines. Confidence: 0.85 - Pin Vite and plugin versions in the lockfile and upgrade them together, reading the migration guide for major versions. Confidence: 0.85 - Use library mode with `vite build --lib` plus a declaration generator when publishing a component package, and mark peer dependencies as external. Confidence: 0.75 - Fix slow cold starts by checking `optimizeDeps` and large barrel files before blaming Vite itself. Confidence: 0.70 - Fail CI on build warnings about circular imports or missing exports instead of letting them pile up. Confidence: 0.65
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
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 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 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