The catalog
Traits
Coding preferences learned from feedback, stored as Markdown in each repository's .agents/traits directory.
crosshatch/traits73 traits
align-operation-module-and-export-namesWhen naming or renaming an operation-focused module and its primary export.
- TypeScript
- TSX
- JavaScript
- JSX
alphabetical-unordered-configurationWhen editing configuration lists or fields whose ordering has no semantic significance.
- TypeScript
- JavaScript
- JSON
- YAML
- TOML
atom-first-react-state-identityWhen defining Effect reactivity atom ownership, identity, or Atom.family factories in React.
- TSX
avoid-empty-jsx-branchesWhen writing conditional React JSX content or empty-content branches.
- TSX
- JSX
avoid-omitting-overwritten-spread-fieldscatch-tags-for-tagged-errorsWhen recovering from tagged Effect errors.
- TypeScript
- TSX
centralized-domain-schema-variantschoose-import-style-by-api-cohesionWhen choosing between named and namespace imports
- TypeScript
- TSX
- JavaScript
- JSX
colocate-domain-types-and-operationsWhen introducing or organizing core domain types and their operations.
- TypeScript
colocate-small-domain-errorsconstruct-values-inside-pipelinesWhen constructing a final value from a transformation pipeline.
- TypeScript
- TSX
css-detected-presentation-defaultsWhen choosing presentation defaults, such as the color scheme, that follow user or device preferences.
- CSS
- HTML
- TSX
- JSX
- TypeScript
- JavaScript
css-first-scroll-layoutWhen implementing scroll-dependent UI layout, sticky positioning, or visibility behavior.
- CSS
- HTML
- TSX
- JSX
- TypeScript
- JavaScript
default-atom-registryWhen using Effect atom hooks, registries, or per-instance React state isolation.
- TSX
defects-for-internal-invariantsWhen designing library error channels for validation or encoding of internally constructed data.
- TypeScript
- TSX
describe-model-visible-tool-parametersWhen defining model-visible parameter schemas for effect/ai tools.
- TypeScript
- TSX
direct-effect-promise-adaptersWhen adapting Promise-returning operations to Effect.
- TypeScript
- TSX
direct-property-access-in-parametersWhen declaring function, callback, or generator parameters that receive objects.
- TypeScript
- TSX
- JavaScript
- JSX
direct-schema-construction-with-explicit-idsdomain-specific-parsing-errorsWhen defining recoverable custom domain errors or modeling parsing failures.
- TypeScript
- TSX
domain-types-for-complete-record-storageWhen designing or implementing storage operations that create or replace complete domain records.
- TypeScript
- TSX
effect-aware-testsWhen writing or updating tests that execute Effects or acquire scoped resources.
- TypeScript
- TSX
- JavaScript
- JSX
effect-based-exception-handlingWhen handling throwable synchronous operations or Promise failures in application code.
- TypeScript
- TSX
- JavaScript
- JSX
effect-foreach-for-collection-resultsWhen traversing a collection to perform Effects and collect the results.
- TypeScript
- TSX
effect-platform-servicesWhen accessing filesystem, paths, working directories, or child processes in application code or synchronous tooling boundaries.
- TypeScript
- TSX
- JavaScript
- JSX
effect-retry-and-schedulesWhen adding retry or backoff behavior to Effect operations.
- TypeScript
- TSX
effect-utilities-with-native-behavior-exceptionsWhen choosing collection, string, numeric, or other utilities beyond inline comparisons and simple runtime checks.
- TypeScript
- TSX
effect-values-for-parameterless-operationsWhen exporting parameterless Effect operations.
- TypeScript
- TSX
explicit-undefined-in-optional-propertiesWhen declaring optional properties.
- TypeScript
- TSX
filter-or-fail-for-effect-validationWhen validating an Effect result solely to fail on a predicate and otherwise continue.
- TypeScript
- TSX
fixed-error-messages-on-error-typesflat-transformation-pipelinesWhen composing successive transformations or Effect.fn transformation arguments.
- TypeScript
- TSX
flow-for-forwarding-pipeline-callbacksWhen a callback only forwards its argument through a pipe of transformations.
- TypeScript
- TSX
inline-guaranteed-react-root-lookupWhen mounting a React client into an application-owned HTML root element.
- TSX
- JSX
- HTML
inline-single-use-schema-and-decision-definitionsWhen defining single-use schemas, transcoders, or lightweight Decision.make values.
- TypeScript
- TSX
inline-small-single-use-helpersWhen introducing or reviewing small single-use helpers, including React atom logic.
- TypeScript
- TSX
- JavaScript
- JSX
inline-text-encoders-and-decodersjsx-same-named-prop-spreadsWhen passing same-named variables as ordinary React JSX props.
- TSX
- JSX
keep-decoded-configuration-on-contextWhen exposing decoded configuration and derived runtime values through an Effect context.
- TypeScript
- TSX
map-final-effect-transformations-in-pipelineminimal-high-value-tests-and-type-first-verificationminimal-test-groupingWhen writing or organizing test files and describe blocks.
- TypeScript
- TSX
- JavaScript
- JSX
named-collection-element-typesnamespace-imports-for-local-modulesWhen importing more than two exports from a local project module or giving multiple local exports aliases with a shared module-name prefix.
- TypeScript
- TSX
- JavaScript
- JSX
native-inline-checks-and-direct-effect-predicatesWhen writing inline comparisons, simple runtime checks, or predicate stages in existing pipelines.
- TypeScript
- TSX
nonredundant-trait-applicability-metadataWhen authoring or reviewing trait applicability metadata.
operation-specific-service-error-channelspass-compatible-callbacks-directlyWhen passing callbacks or defining forwarding functions or service methods.
- TypeScript
- TSX
- JavaScript
- JSX
pipe-immediate-curried-applicationsWhen immediately applying the function returned by a curried call to a value.
- TypeScript
- TSX
- JavaScript
- JSX
pipe-schema-field-modifiersWhen applying optional, nullable, or similar modifiers to Effect Schema fields.
- TypeScript
- TSX
plain-promises-in-build-tool-callbacksWhen writing plugin hooks and other framework callbacks in build-tool configuration files.
- TypeScript
- JavaScript
predefined-constant-effectsWhen constructing successful constant Effects with predefined equivalents.
- TypeScript
- TSX
prefer-patch-changesetsWhen authoring changesets or choosing a release increment.
- Markdown
preserve-built-in-effect-errorsWhen deciding whether to wrap or remap built-in Effect errors.
- TypeScript
- TSX
react-state-and-actions-as-atomsWhen defining React component state, event handlers, or asynchronous actions.
- TSX
remove-effect-free-generatorsWhen introducing or reviewing Effect.gen wrappers and Layer construction.
- TypeScript
- TSX
reuse-named-domain-field-typesWhen referencing a model field's type or schema where a dedicated domain type already exists.
- TypeScript
- TSX
schema-decoding-defaults-for-configurationWhen defining, decoding, or consuming schema-backed configuration with optional defaults.
- TypeScript
- TSX
schema-parsers-for-structured-documentsschema-tagged-union-case-factoriesWhen constructing members of Effect Schema tagged unions.
- TypeScript
- TSX
schema-validated-configurationWhen loading and validating configuration with Effect Config.
- TypeScript
- TSX
shared-layers-at-program-boundariesWhen providing shared Effect service layers or choosing dependency scopes.
- TypeScript
- TSX
static-imports-firstWhen adding or reorganizing static module imports.
- TypeScript
- TSX
- JavaScript
- JSX
strip-margin-for-multiline-textWhen writing large multiline text strings with Effect String.stripMargin.
- TypeScript
- TSX
structural-equality-for-composite-keysWhen composite keys in Effect collections, caches, or Atom.family need content-based equality.
- TypeScript
- TSX
tagged-enum-runtime-factoriesWhen declaring an Effect Data.TaggedEnum type alias.
- TypeScript
- TSX
tagged-union-case-guardsWhen testing or filtering cases of tagged unions with built-in case guards.
- TypeScript
- TSX
terminology-in-site-copyWhen writing traits.sh user-facing copy, including accessibility descriptions.
- TypeScript
- TSX
- HTML
- Markdown
test-model-behavior-with-real-integrationstype-alias-before-schemaWhen extracting a static type from an Effect schema.
- TypeScript
- TSX
unwrap-presence-only-optionsWhen using Option only to test presence and access the contained value.
- TypeScript
- TSX
yield-before-call-argumentsWhen sequencing Effect generator results and passing them to transformations or function calls.
- TypeScript
- TSX
yield-effectable-errors-directlyWhen returning or yielding an Effect error value that is itself effectable.
- TypeScript
- TSX