public-library Vetted by Rulemart
Public engineering rules from Fabrica for coding agents, with versioned groups projects can adopt and customize.
A library release publishes new versions of one or more rules at once. Each rule keeps its own version.
Library release 14 changes no rules. It updates shared files, such as group descriptions or shared assets.
All rule versions in this library release
Library release 13 changes no rules. It updates shared files, such as group descriptions or shared assets.
All rule versions in this library release
Library release 12 changes 7 rules: 7 new.
New rules
- Write comments in plain, direct language practices/documentation/write-comments-in-plain-language 1.0.0 New rule: write code comments in plain, direct language, with the actor, action, condition, and consequence clear, related words kept together, and project-specific shorthand explained. Clear comments in any sentence shape need no rewrite.
- Build the explanation in steps practices/writing/build-the-explanation-in-steps 1.0.0 New rule: build an explanation from what the reader already knows, supplying each premise and walking through a concrete case before stating the lesson.
- Give the reader a map, then follow it practices/writing/give-the-reader-a-map 1.0.0 New rule: give a long piece an opening that says why it matters, a map or sequence the sections follow, headings that name what each section contributes, and a close that resolves the opening.
- Make important abstractions concrete practices/writing/make-abstractions-concrete 1.0.0 New rule: make important claims and ideas concrete with numbers, examples, analogies, or visuals, and back factual claims with evidence rather than illustration.
- Make the actor and action clear practices/writing/name-who-acts 1.0.0 New rule: make clear who performs each action in published prose, preferring concrete subjects and direct verbs over buried nouns and needless passive voice.
- Take a side and earn it practices/writing/take-a-side 1.0.0 New rule: when a piece argues or recommends, state the position plainly, answer the strongest objection, and say where the recommendation stops applying.
- Write to one reader as if they're across the table practices/writing/write-to-one-reader 1.0.0 New rule: write first-person posts and announcements conversationally to one reader, without faked enthusiasm or invented experiences.
This library release also updates shared files, such as group descriptions or shared assets.
All rule versions in this library release
Library release 11 changes 13 rules: 8 new, 3 major, 1 minor, and 1 patch.
New rules
- End AGENTS.md with a section on maintaining it practices/agents-md/end-agents-md-with-a-maintenance-section 1.0.0 New rule: end a project's AGENTS.md with a short maintenance section that states four principles (broadly useful or costly to violate, point at the owner, rewrite or prune, stay concise). Kun Chen's footer is a starting template projects may adapt, not required wording.
- Hold a size budget for always-loaded agent instructions practices/agents-md/hold-a-budget-for-always-loaded-instructions 1.0.0 New rule: choose a size budget for the root instruction file, including generated content and imports, and skill descriptions; pay for additions by pruning or moving entries, shrink an oversized file incrementally, and treat 5,000 tokens as an example ceiling to tune, not a limit the rule enforces.
- Keep AGENTS.md to what almost every session needs and can't see practices/agents-md/keep-agents-md-to-what-every-session-needs 1.0.0 New rule: an always-loaded agent instruction file holds only what almost every session needs and can't see in the code, points to the owners of everything else, moves narrow procedures out, keeps CLAUDE.md as only @AGENTS.md, and replaces an exceptionless rule with one line that names its check.
- Head a file with its purpose only when its name can't say it practices/documentation/file-header-when-name-falls-short 1.0.0 New rule: start a hand-written file with a short purpose comment only when its name and location can't say what it is for, or when it deliberately leaves out something a reader would expect.
- Give every lint or type-checker suppression a reason practices/documentation/give-every-suppression-a-reason 1.0.0 New rule: every lint or type-checker suppression names the one check it disables and gives a reason a reviewer can verify.
- Link every TODO and workaround to where it will be resolved practices/documentation/link-todos-and-workarounds 1.0.0 New rule: every TODO, FIXME, and workaround links the issue, pull request, or upstream document that tracks it.
- Give exported Go identifiers and non-obvious functions doc comments stating their intent techs/go/doc-comments-state-intent 1.0.0 New rule: exported Go identifiers and unexported functions whose intent isn't apparent get a doc comment that starts with the name and states its intent and the guarantees callers rely on; main packages get a command comment.
- Define every property of a domain type techs/typescript/define-domain-type-properties 1.0.0 New rule: every property of a TypeScript domain type gets a one-sentence definition of the term, or of its role when a reusable domain type owns the term; other properties are commented only for optional or null meaning, invariants, and cross-module references.
Major changes
Code that complied with the previous rule version could fail the new one, so review these before updating.
- Comment intent, and point at the owner instead of describing it practices/documentation/comments-state-intent 1.0.0 → 2.0.0 Try a clearer name, narrower type, test, or lint rule before writing a body comment; commented-out code and banner comments are now violations; outside constraints link their upstream source.
- Define every domain field, and comment other struct fields whose meaning the type does not show techs/go/comment-non-obvious-struct-fields 1.0.0 → 2.0.0 Every field of a domain type now needs a one-sentence definition of the term, or of its role when a reusable domain type such as Money owns the term; short comments may sit after the field; other structs keep the existing narrow cases.
- Give exported TypeScript interfaces and non-obvious functions doc comments stating their intent techs/typescript/comment-role-result-and-constraints 2.0.0 → 3.0.0 Exported functions, classes, methods, types, and components need a doc comment stating intent and every guarantee callers rely on, with an eslint-plugin-jsdoc configuration that checks that scope; unexported functions need one only when their intent isn't apparent; file headers are no longer required on every file, and guidance on constraints, TODOs, and body comments moved to the Documentation practice rules.
Minor changes
- Separate package documentation from file headers techs/go/comments-package-doc-vs-file-header 1.0.0 → 1.1.0 A main package's comment may start with Command <name> instead of Package <name>, and the file header example now states what the file is not for.
Patch changes
- Avoid silencing the type checker techs/typescript/avoid-silencing-the-type-checker 1.0.0 → 1.0.1 The requirement to give @ts-expect-error a reason moved to the Documentation practice rule on suppressions; using @ts-expect-error instead of @ts-ignore is unchanged.
This library release also updates shared files, such as group descriptions or shared assets.
All rule versions in this library release
Library release 10 changes 2 rules: 1 new and 1 minor.
New rules
- Apply asynchronous results only while they remain valid practices/concurrency/apply-async-results-only-while-valid 1.0.0 Apply asynchronous results only to destinations that still accept them, covering competing cache writers, owner changes, and controlled completion-order tests.
Minor changes
- Hide implementation decisions behind meaningful interfaces practices/code-design/hide-implementation-decisions 1.0.0 → 1.1.0 Clarify lifecycle ownership, including session replacement and read/write coordination, with an editing-target example and caller-contract checks.
This library release also updates shared files, such as group descriptions or shared assets.
All rule versions in this library release
Library release 9 changes no rules. It updates shared files, such as group descriptions or shared assets.
All rule versions in this library release
Library release 8 changes 8 rules: 3 new, 4 major, and 1 minor.
New rules
- Remove unnecessary error cases through contract design practices/code-design/remove-unnecessary-error-cases 1.0.0 Define successful ordinary outcomes deliberately while preserving meaningful failure and authorization semantics.
- Comment intent, and point at the owner instead of describing it practices/documentation/comments-state-intent 1.0.0 New rule: comments document purpose, contracts the code can't express, and the reasons for constraints, and point at the owner instead of duplicating implementation details or conventions it already states.
- State the current model and its reasons, not how it got there practices/documentation/state-the-current-model 1.0.0 New rule: guidance states the current model and its reasons, and leaves decision history to version control and decision records, while keeping migration and compatibility instructions that still apply.
Major changes
Code that complied with the previous rule version could fail the new one, so review these before updating.
- Separate pure computation from effects practices/code-design/separate-pure-computation-from-effects 1.0.0 → 2.0.0 Keep pure computation inside complete module operations without making callers coordinate implementation details.
- Build complex components from composable parts techs/react/architecture-compound-components 1.0.0 → 2.0.0 Expose composable parts for structural variation and complete components for repeated standard arrangements.
- Comment the role, the result, and the hidden constraint techs/typescript/comment-role-result-and-constraints 1.0.0 → 2.0.0 Draft interface contracts before implementation and allow high-level phase intent alongside hidden constraints.
- Require caller-owned inputs and document defaults techs/typescript/require-properties-and-name-parameters 1.0.0 → 2.0.0 Require caller-owned inputs while hiding implementation choices and documenting ordinary defaults, and split a function only when its options select different operations or incompatible states.
Minor changes
- Organize code by feature practices/code-design/organize-code-by-feature 1.0.0 → 1.1.0 Clarify that feature-local placement permits general interfaces before a second consumer exists.
This library release also updates shared files, such as group descriptions or shared assets.
All rule versions in this library release
Library release 7 changes 2 rules: 2 new.
New rules
- Hide implementation decisions behind meaningful interfaces practices/code-design/hide-implementation-decisions 1.0.0 Keep each implementation decision, including step order, data formats, and settings the module can determine, in its owning module, and expose only caller intent, policies, and shared resources through meaningful interfaces.
- Record facts when they happen practices/code-design/record-facts-when-they-happen 1.0.0 Adds a rule: when code needs to know something that happened earlier, such as which question a reply answered or whether a payment was refunded, write it down when it happens instead of working it out later from timestamps or record order; old records that lack it get one explicit outcome, not a guess.
This library release also updates shared files, such as group descriptions or shared assets.
All rule versions in this library release
Library release 6 changes no rules. It updates shared files, such as group descriptions or shared assets.
All rule versions in this library release
Library release 5 changes no rules. It updates shared files, such as group descriptions or shared assets.
All rule versions in this library release
Library release 4 changes no rules. It updates shared files, such as group descriptions or shared assets.
All rule versions in this library release
Library release 3 changes 8 rules: 8 patch.
Patch changes
- Choose tests by risk and cost practices/testing/choose-tests-by-risk 1.0.0 → 1.0.1 Fixes the link to the testing philosophy after the library moved to the .trailguide/ layout; the guidance is unchanged.
- Cover empty inputs and boundaries practices/testing/cover-boundary-cases 1.0.0 → 1.0.1 Fixes the link to the testing philosophy after the library moved to the .trailguide/ layout; the guidance is unchanged.
- Keep tests independent practices/testing/keep-tests-independent 1.0.0 → 1.0.1 Fixes the link to the testing philosophy after the library moved to the .trailguide/ layout; the guidance is unchanged.
- Name tests for the behavior and the condition practices/testing/name-tests-for-behavior-and-condition 1.0.0 → 1.0.1 Fixes the link to the testing philosophy after the library moved to the .trailguide/ layout; the guidance is unchanged.
- Run focused tests while iterating, and the full suite before finishing practices/testing/run-focused-tests-while-iterating 1.0.0 → 1.0.1 Fixes the link to the testing philosophy after the library moved to the .trailguide/ layout; the guidance is unchanged.
- Test at the lowest layer that proves the behavior practices/testing/test-at-the-lowest-layer 1.0.0 → 1.0.1 Fixes the link to the testing philosophy after the library moved to the .trailguide/ layout; the guidance is unchanged.
- Reproduce bugs with regression tests practices/testing/test-bug-fixes-before-fixing 1.0.0 → 1.0.1 Fixes the link to the testing philosophy after the library moved to the .trailguide/ layout; the guidance is unchanged.
- Test observable behavior practices/testing/test-observable-behavior 1.0.0 → 1.0.1 Fixes the link to the testing philosophy after the library moved to the .trailguide/ layout; the guidance is unchanged.
All rule versions in this library release
Library release 2 changes 2 rules: 1 new and 1 major.
New rules
- Load measurement scripts the way their vendors document techs/javascript/load-measurement-scripts-as-documented 1.0.0 New rule: load page-view analytics and real user monitoring scripts in their vendor-documented non-blocking form, without idle, timer, load, or interaction delays.
Major changes
Code that complied with the previous rule version could fail the new one, so review these before updating.
- Defer non-critical browser work to idle time techs/javascript/defer-non-critical-work-to-idle-time 1.0.0 → 2.0.0 Requires page-load work to wait for the load event and a painted frame before idle time, and limits the rule to work your own code runs; loading analytics and monitoring scripts moved to its own rule.