JBCT Rules

These are the 72 rules the JBCT linter checks in Pragmatica 1.0.0-rc3. Each rule’s one-line description is the tool’s own, taken from the rule’s source at that tag (c67664bd9). The tools page covers how to run them.

Return types

RuleDefaultWhat it flagsCourse section
JBCT-BND-01ERRORForbidden boundary types in business logic.The Four Return Types
JBCT-RET-01ERRORBusiness methods must use only four return kinds.The Four Return Types
JBCT-RET-02ERRORNo nested wrappers.The Four Return Types
JBCT-RET-04ERRORUse Unit instead of Void.Pragmatica Core Essentials
JBCT-RET-05WARNINGa step that cannot fail, typed as if it can.Systematic Application Guide
JBCT-RET-07ERRORDiscarded Result/Promise/Option value.Troubleshooting & FAQ

Null safety

RuleDefaultWhat it flagsCourse section
JBCT-RET-03ERRORNever return null.Null Policy & Error Recovery
JBCT-RET-06ERRORNo nullable parameters - use Option instead.Null Policy & Error Recovery
JBCT-RET-08WARNINGNo null literal passed as a call argument.Null Policy & Error Recovery
JBCT-TOT-03WARNINGJackson wire-record accessor dereferences a possibly-null component.not covered

Exception hygiene

RuleDefaultWhat it flagsCourse section
JBCT-EX-01ERRORNo business exceptions.Error Handling & Composition
JBCT-EX-02ERRORDon't use orElseThrow().not covered
JBCT-REC-01WARNINGa failure absorbed without a recorded reason.not covered
JBCT-SEAL-01WARNINGError interfaces should be sealed.Error Handling & Composition
JBCT-STY-01WARNINGPrefer fluent failure style (cause.result()).Pragmatica Core Essentials
JBCT-TOT-01ERRORNo partial operations inside a carrier mapper lambda.Troubleshooting & FAQ
JBCT-TOT-02ERRORNo partial method reference in a carrier mapper.Troubleshooting & FAQ
JBCT-UTIL-01WARNINGUse Pragmatica parsing utilities instead of JDK parsing methods.Pragmatica Core Essentials

Typed errors

RuleDefaultWhat it flagsCourse section
JBCT-CAUSE-01ERRORcause representation shape — every same-file cause variant is a record or a prescribed-shape enum.Error Handling & Composition
JBCT-CAUSE-02ERRORno hand-written message() bodies.Error Handling & Composition
JBCT-CAUSE-03WARNINGthe message component of a cause record occupies the final position (R2) — the trailing slot is what lets the canonical constructor reference line up with the causeFactory shapes, which pass the formatted message last.Error Handling & Composition
JBCT-CAUSE-04ERRORthe R1 arity equation — template conversions == forNValues' N == target record components − 1.Error Handling & Composition
JBCT-CAUSE-05WARNINGa cause record wrapping an underlying cause implements Cause.Wrapped with an origin component rather than hand-declaring a source() override.Error Handling & Composition
JBCT-CAUSE-07WARNINGthe single-argument template rungs (forOneValue(String) etc.) produce anonymous, value-discarding causes; in production sources a parameterized failure is worth naming and retaining (R1) through the causeFactory rungs.Error Handling & Composition
JBCT-CAUSE-08WARNINGno direct construction of cause records — FACTORY is the construction path.Error Handling & Composition

Pattern purity

RuleDefaultWhat it flagsCourse section
JBCT-ARCH-01ERRORdependency direction — imports point up only.Project Structure & Framework Integration
JBCT-ARCH-02WARNINGlift(...) is confined to the adapter-boundary zone.Error Handling & Composition
JBCT-ARCH-03WARNINGa use case must not call another use case.Troubleshooting & FAQ
JBCT-ARCH-04ERRORa slice must not import another slice's internals.Project Structure & Framework Integration
JBCT-INJ-01WARNINGconstructor/factory injection only.not covered
JBCT-MIX-01ERRORNo I/O operations in domain packages.Systematic Application Guide
JBCT-MUT-01WARNINGNo parameter reassignment.not covered
JBCT-NEST-01WARNINGNo nested monadic operations in lambdas.Systematic Application Guide
JBCT-PAT-01WARNINGUse functional iteration instead of raw loops.Basic Patterns & Structure
JBCT-PAT-02WARNINGNo pattern mixing in chains.Basic Patterns & Structure
JBCT-PAT-03WARNINGBlocking .await() call.Troubleshooting & FAQ
JBCT-SEQ-01WARNINGChain length limit (2-5 steps).Advanced Patterns
JBCT-SHAPE-01INFOa method blends two JBCT patterns at one altitude (MIXED, census, INFO).Basic Patterns & Structure
JBCT-SHAPE-02INFO (off)a method has no single JBCT pattern (UNCLASSIFIED, census, INFO).Basic Patterns & Structure
JBCT-SHAPE-03INFO (off)a method's composition shape disagrees with its name-verb's zone (mis-leveled, INFO).Basic Patterns & Structure
JBCT-STAGE-01WARNINGstage-record conventions in growing-context pipelines.Knowledge-Gathering Pipelines

Factory methods

RuleDefaultWhat it flagsCourse section
JBCT-ACR-01WARNINGAcronym naming convention.Basic Patterns & Structure
JBCT-NAM-01WARNINGFactory method naming convention.Basic Patterns & Structure
JBCT-NAM-02WARNINGUse Valid prefix, not Validated.Basic Patterns & Structure
JBCT-NAM-03WARNING*State suffix discipline.From Process to Patterns
JBCT-NAM-04WARNINGLocal records use lowercase camelCase names.not covered
JBCT-UC-01WARNINGUse case factories should return lambdas, not nested records.Systematic Application Guide
JBCT-UC-02WARNINGuse-case interface structure.Complete Example - RegisterUser
JBCT-UTIL-02WARNINGUse Verify.Is predicates for validation.Pragmatica Core Essentials
JBCT-VAL-01WARNINGboolean validation methods.Parse, Don't Validate
JBCT-VO-01WARNINGValue objects need a factory method (returning T, Option<T>, or Result<T>).Parse, Don't Validate
JBCT-VO-02ERRORDirect constructor calls bypass factory validation.Troubleshooting & FAQ

Lambda compliance

RuleDefaultWhat it flagsCourse section
JBCT-LAM-01WARNINGNo complex logic in lambdas.Basic Patterns & Structure
JBCT-LAM-02WARNINGNo braces in lambdas.Systematic Application Guide
JBCT-LAM-03WARNINGNo ternary in lambdas.Basic Patterns & Structure
JBCT-SIDE-01INFOside effects in transformation lambdas (heuristic, INFO).not covered
JBCT-STY-02WARNINGPrefer constructor references (X::new).Systematic Application Guide
JBCT-STY-05WARNINGPrefer method references over equivalent lambdas.Systematic Application Guide

Style (advisory)

RuleDefaultWhat it flagsCourse section
JBCT-LOG-01WARNINGNo conditional logging.not covered
JBCT-LOG-02WARNINGNo logger as method parameter.Systematic Application Guide
JBCT-NAM-05WARNINGTest methods use underscore-separated method_[scenario_]expectation naming.Basic Patterns & Structure
JBCT-ORD-01WARNINGmember ordering per file type.Project Structure & Framework Integration
JBCT-STATIC-01WARNINGPrefer static imports for Pragmatica factory methods.not covered
JBCT-STY-03WARNINGNo fully qualified class names in code.Systematic Application Guide
JBCT-STY-04WARNINGUtility class pattern.Project Structure & Framework Integration
JBCT-STY-06WARNINGImport ordering convention.Project Structure & Framework Integration
JBCT-STY-07WARNINGUnnecessary intermediate variable before return.not covered
JBCT-STY-08WARNINGIf/else with return in both branches.not covered
JBCT-STY-09WARNINGNo nested ternaries.Basic Patterns & Structure
JBCT-ZONE-01WARNINGStep interfaces should use Zone 2 verbs.Basic Patterns & Structure
JBCT-ZONE-02WARNINGLeaf functions should use Zone 3 verbs.Basic Patterns & Structure
JBCT-ZONE-03WARNINGNo zone mixing in sequencer chains.Basic Patterns & Structure