public-library Vetted by Skillmart
Public engineering rules from Fabrica for coding agents, with versioned groups projects can adopt and customize.
Go techs/go
Add operation and identifier context to errors at boundaries
MEDIUMfabricahq/public-library
Define every domain field, and comment other struct fields whose meaning the type does not show
MEDIUMfabricahq/public-library
Expose error identity only for contract errors
MEDIUMfabricahq/public-library
Give exported Go identifiers and non-obvious functions doc comments stating their intent
LOW-MEDIUMfabricahq/public-library
Give text and its parsed form one owner
MEDIUMfabricahq/public-library
Separate package documentation from file headers
LOWfabricahq/public-library
Goose techs/goose
JavaScript techs/javascript
Avoid layout thrashing
MEDIUMfabricahq/public-library
Await only on paths that need the result
MEDIUMfabricahq/public-library
Defer non-critical browser work to idle time
MEDIUMfabricahq/public-library
Keep dynamic import and file paths statically analyzable
MEDIUMfabricahq/public-library
Load measurement scripts the way their vendors document
LOW-MEDIUMfabricahq/public-library
Mark scroll-related listeners passive when they never cancel scrolling
MEDIUMfabricahq/public-library
Start independent asynchronous work concurrently
HIGHfabricahq/public-library
Version and minimize data in browser storage
MEDIUMfabricahq/public-library
Playwright techs/playwright
Scope locators by test id, then select controls by role and name
MEDIUMfabricahq/public-library
Synchronize with auto-waiting actions and web-first assertions
MEDIUM-HIGHfabricahq/public-library
React techs/react
Accept ref as a prop in React 19
LOWfabricahq/public-library
Authenticate and authorize inside every Server Action
CRITICALfabricahq/public-library
Avoid copying props to state
HIGHfabricahq/public-library
Avoid loading large barrel files
MEDIUMfabricahq/public-library
Avoid unnecessary Effects
HIGHfabricahq/public-library
Build complex components from composable parts
MEDIUMfabricahq/public-library
Compose independent server data fetches as siblings
HIGHfabricahq/public-library
Create explicit component variants instead of boolean mode props
MEDIUMfabricahq/public-library
Deduplicate per-request server work with cache
MEDIUMfabricahq/public-library
Do not define components inside components
HIGHfabricahq/public-library
Follow the Rules of Hooks
HIGHfabricahq/public-library
Give every interactive element a role and an accessible name
HIGHfabricahq/public-library
Give repeated and persistent surfaces stable test ids
MEDIUMfabricahq/public-library
Hint critical resources with React DOM resource APIs
MEDIUMfabricahq/public-library
Initialize expensive state lazily
LOW-MEDIUMfabricahq/public-library
Keep components and Hooks pure
HIGHfabricahq/public-library
Keep input responsive by marking non-urgent updates
MEDIUMfabricahq/public-library
Keep non-critical scripts off the critical path
MEDIUM-HIGHfabricahq/public-library
Keep request data out of shared module state
HIGHfabricahq/public-library
Keep values that do not affect rendering in refs
MEDIUMfabricahq/public-library
Lift shared component state into a provider behind an interface
MEDIUMfabricahq/public-library
Load heavy optional code on demand
HIGHfabricahq/public-library
Memoize deliberately
MEDIUMfabricahq/public-library
Name Effect and non-trivial Hook callbacks
LOWfabricahq/public-library
Name generic components by capability, not by first caller
MEDIUMfabricahq/public-library
Pass only the data Client Components use
MEDIUMfabricahq/public-library
Read the latest callbacks in Effects without resubscribing
MEDIUMfabricahq/public-library
Render client-only preferences without a flash or hydration error
MEDIUMfabricahq/public-library
Reuse request-independent server data across requests
MEDIUMfabricahq/public-library
Run app-wide initialization once per app load
LOW-MEDIUMfabricahq/public-library
Run post-response work after the response
MEDIUMfabricahq/public-library
Share client data requests through a caching data layer
MEDIUM-HIGHfabricahq/public-library
Skip off-screen rendering work in long lists
MEDIUMfabricahq/public-library
Stream slow data behind Suspense boundaries
MEDIUM-HIGHfabricahq/public-library
Subscribe to and depend on only the values you use
MEDIUMfabricahq/public-library
Suppress only expected hydration mismatches
LOW-MEDIUMfabricahq/public-library
Use a boolean condition for conditional rendering
LOW-MEDIUMfabricahq/public-library
Use Activity to hide UI that should keep its state
MEDIUMfabricahq/public-library
Use functional updates when new state depends on old state
MEDIUMfabricahq/public-library
TanStack Query techs/tanstack-query
Define hierarchical query keys and options in factories
MEDIUMfabricahq/public-library
Derive component views of query data with a stable select
LOW-MEDIUMfabricahq/public-library
Derive infinite query page params from the server's response
MEDIUMfabricahq/public-library
Fetch a dynamic set of queries with useQueries
MEDIUMfabricahq/public-library
Invalidate or update every query a mutation changes
HIGHfabricahq/public-library
Key each query by every input it uses
HIGHfabricahq/public-library
Make offline behavior explicit
LOW-MEDIUMfabricahq/public-library
Make optimistic updates reversible, and decide them once
MEDIUM-HIGHfabricahq/public-library
Pass the query's AbortSignal to the request
MEDIUMfabricahq/public-library
Prefetch likely next data on user intent
MEDIUMfabricahq/public-library
Prefetch on the server and hydrate the query cache
MEDIUM-HIGHfabricahq/public-library
Read mutation state from other components with useMutationState
LOW-MEDIUMfabricahq/public-library
Reset query errors when an error boundary retries
HIGHfabricahq/public-library
Set staleTime from how fast data changes
MEDIUMfabricahq/public-library
Use initialData only for complete data
MEDIUMfabricahq/public-library
TanStack Router techs/tanstack-router
Load route data in loaders, in parallel
HIGHfabricahq/public-library
Mask modal routes with the resource's canonical URL
LOWfabricahq/public-library
Provide shared dependencies through typed router context
HIGHfabricahq/public-library
Register the router and read route data through typed route APIs
MEDIUMfabricahq/public-library
Set app-wide navigation behavior in router defaults
MEDIUMfabricahq/public-library
Split route components out of the main bundle
MEDIUMfabricahq/public-library
Throw notFound for missing resources and render it with notFoundComponent
MEDIUM-HIGHfabricahq/public-library
Use Link for navigation users can open, and redirect in the router
MEDIUMfabricahq/public-library
Validate search params with defaults at the route
HIGHfabricahq/public-library
With TanStack Query, load route data into the Query cache
HIGHfabricahq/public-library
TypeScript techs/typescript
Annotate types at module boundaries and where they narrow
MEDIUMfabricahq/public-library
Avoid silencing the type checker
HIGHfabricahq/public-library 1 star
Declare constants with as const, and satisfies when a type exists
MEDIUMfabricahq/public-library
Define every property of a domain type
MEDIUMfabricahq/public-library
Distinguish null from undefined
LOWfabricahq/public-library
Follow consistent naming conventions
LOWfabricahq/public-library
Generate service types from their contracts
HIGHfabricahq/public-library
Give exported TypeScript interfaces and non-obvious functions doc comments stating their intent
MEDIUMfabricahq/public-library
Import types with import type
MEDIUMfabricahq/public-library
Model distinct states as discriminated unions
MEDIUMfabricahq/public-library
Narrow unknown values before use
HIGHfabricahq/public-library
Prefer literal unions over enums
MEDIUMfabricahq/public-library
Prefer type aliases over interfaces
LOWfabricahq/public-library
Preserve caller-owned data
MEDIUMfabricahq/public-library
Require caller-owned inputs and document defaults
MEDIUM-HIGHfabricahq/public-library
Use Boolean() for explicit boolean coercion
LOWfabricahq/public-library
Use named exports
LOWfabricahq/public-library
Use one array type syntax
LOWfabricahq/public-library
Use predictable file names
LOWfabricahq/public-library
Use template literal types for patterned strings
LOW-MEDIUMfabricahq/public-library
Zustand techs/zustand
Create stores once, outside render
HIGHfabricahq/public-library
Define typed state and named actions
MEDIUM-HIGHfabricahq/public-library
Keep each store focused on one domain
MEDIUMfabricahq/public-library
Keep store state serializable
MEDIUMfabricahq/public-library
Persist only safe, versioned state
HIGHfabricahq/public-library
Rehydrate persisted stores after React hydration
HIGHfabricahq/public-library
Reset stores between tests and test actions directly
MEDIUMfabricahq/public-library
Subscribe with narrow, stable selectors
HIGHfabricahq/public-library
Update store state functionally and immutably
HIGHfabricahq/public-library
Use Zustand only for shared client state
HIGHfabricahq/public-library
practices/agents-mdnot canonical
End AGENTS.md with a section on maintaining it
MEDIUMfabricahq/public-library
Hold a size budget for always-loaded agent instructions
MEDIUMfabricahq/public-library
Keep AGENTS.md to what almost every session needs and can't see
MEDIUMfabricahq/public-library
Code design practices/code-design
Express operations as meaningful steps
MEDIUMfabricahq/public-library
Hide implementation decisions behind meaningful interfaces
HIGHfabricahq/public-library
Organize code by feature
MEDIUMfabricahq/public-library
Record facts when they happen
HIGHfabricahq/public-library
Remove unnecessary error cases through contract design
MEDIUM-HIGHfabricahq/public-library
Separate pure computation from effects
MEDIUMfabricahq/public-library
Concurrency practices/concurrency
Apply asynchronous results only while they remain valid
HIGHfabricahq/public-library
Honor cancellation and deadlines across every blocking stage
HIGHfabricahq/public-library
Keep shared resources alive until their users finish
HIGHfabricahq/public-library
Documentation practices/documentation
Comment intent, and point at the owner instead of describing it
MEDIUMfabricahq/public-library
Give every lint or type-checker suppression a reason
MEDIUMfabricahq/public-library
Head a file with its purpose only when its name can't say it
LOWfabricahq/public-library
Link every TODO and workaround to where it will be resolved
LOW-MEDIUMfabricahq/public-library
State the current model and its reasons, not how it got there
MEDIUMfabricahq/public-library
Write comments in plain, direct language
MEDIUMfabricahq/public-library
Performance practices/performance
READMEs practices/readmes
Give a quick start that runs as written
MEDIUM-HIGHfabricahq/public-library
Keep the README an entry point, and link to the full documentation
MEDIUMfabricahq/public-library
Match the README's presentation to the product's tier
MEDIUMfabricahq/public-library
Open with what the product does for the reader
MEDIUMfabricahq/public-library
State what the product does not do
MEDIUMfabricahq/public-library
Testing practices/testing
Choose tests by risk and cost
HIGHfabricahq/public-library
Cover empty inputs and boundaries
MEDIUMfabricahq/public-library
Keep tests independent
MEDIUM-HIGHfabricahq/public-library
Name tests for the behavior and the condition
LOWfabricahq/public-library
Reproduce bugs with regression tests
HIGHfabricahq/public-library
Run focused tests while iterating, and the full suite before finishing
LOW-MEDIUMfabricahq/public-library
Test at the lowest layer that proves the behavior
MEDIUM-HIGHfabricahq/public-library
Test observable behavior
HIGHfabricahq/public-library
practices/writingnot canonical
Build the explanation in steps
MEDIUMfabricahq/public-library
Give the reader a map, then follow it
MEDIUMfabricahq/public-library
Make important abstractions concrete
MEDIUMfabricahq/public-library
Make the actor and action clear
MEDIUMfabricahq/public-library
Take a side and earn it
MEDIUMfabricahq/public-library
Write to one reader as if they're across the table
LOW-MEDIUMfabricahq/public-library