Documentation
Lignes directrices

Governance Rules

Pour les développeurs

Every architecture rule enforced at build time and the test suites that enforce it — generated from the governance kit. For contributors who want to know what the build will refuse.

🤖 Generated from code by scripts/generate-docs.mjs — do not hand-edit. Run orazaka docs build to refresh.

A rule with no suite is a rule that enforces nothing — it is written, it compiles, and no build fails when it is violated. Treat an empty cell as a defect, not as a gap.

ConfigBindingRules

RuleEnforced bySummary
assertConfigurationBindsUnambiguouslyAutomationServiceGovernanceTestEdgeGovernanceTestGovernanceTestJobServiceGovernanceTestKnowledgeServiceGovernanceTestRouterGovernanceTestStudioServiceGovernanceTest[CFG-001] over the Orazaka and Krizaka classes on this module's classpath — krizaka-test-support's com.krizaka.test.architecture.ConfigBindingRules#assertConfigurationBindsUnambiguously.
assertInjectableComponentsHaveOneConstructorAutomationServiceGovernanceTestEdgeGovernanceTestGovernanceTestJobServiceGovernanceTestKnowledgeServiceGovernanceTestRouterGovernanceTestStudioServiceGovernanceTest[CFG-001] every Spring bean on this module's classpath has a constructor it can be built with.

ExecutorCoherenceRules

RuleEnforced bySummary
assertEveryCapabilityHasAnExecutorAutomationServiceGovernanceTestBusinessGovernanceTestEdgeGovernanceTestInterceptorsGovernanceTestJobServiceGovernanceTestKnowledgeServiceGovernanceTestRouterGovernanceTestStudioServiceGovernanceTest[EXEC-001] Every enabled capability executed in process has a JobExecutor for its handler_key.
assertEveryCapabilityIsDrainedAutomationServiceGovernanceTestBusinessGovernanceTestEdgeGovernanceTestInterceptorsGovernanceTestJobServiceGovernanceTestKnowledgeServiceGovernanceTestRouterGovernanceTestStudioServiceGovernanceTest[EXEC-002] Every enabled capability's routing_key is drained by some worker's declared bindings.

GovernanceRules

RuleEnforced bySummary
assertCollectionFieldsPrivateFinalBusinessGovernanceTestInterceptorsGovernanceTestToolsGovernanceTestCollection fields are private final [ADR-007].
assertDedupIsAtomicJobServiceGovernanceTest[KIT-002] Message deduplication has one author: krizaka-messaging.
assertDomainHasNoTransportDtosBusinessGovernanceTestStudioServiceGovernanceTestThe domain holds no *Request/*Response [ERR-130] — krizaka-test-support's rule.
assertDomainPurityToolsGovernanceTest[HEX-002] The domain depends on no framework.
assertEndpointRuleHasOneAuthorJobServiceGovernanceTest[CAP-002] The endpoint rule has one author.
assertEveryCapabilityHasAnExecutorAutomationServiceGovernanceTestBusinessGovernanceTestEdgeGovernanceTestInterceptorsGovernanceTestJobServiceGovernanceTestKnowledgeServiceGovernanceTestRouterGovernanceTestStudioServiceGovernanceTest[EXEC-001] Fails when an in-process capability's handler_key has no JobExecutor.
assertEveryCapabilityIsDrainedAutomationServiceGovernanceTestBusinessGovernanceTestEdgeGovernanceTestInterceptorsGovernanceTestJobServiceGovernanceTestKnowledgeServiceGovernanceTestRouterGovernanceTestStudioServiceGovernanceTest[EXEC-002] Fails when a capability's routing_key is drained by no declared worker.
assertFieldsPrivateBusinessGovernanceTestInterceptorsGovernanceTestPersistenceBridgeGovernanceTestPersistenceGovernanceTestToolsGovernanceTestInstance fields of concrete classes are private [ADR-009].
assertImplClassesPackagePrivatePersistenceGovernanceTest*Impl classes are not public [ERR-105].
assertInternalSurfaceRequiresServiceAuthorityAutomationServiceGovernanceTestEdgeGovernanceTestJobServiceGovernanceTestKnowledgeServiceGovernanceTestRouterGovernanceTestStudioServiceGovernanceTestFails when a SecurityConfig matches /internal/v1/** without demanding the SERVICE authority.
assertMappersFinalInterceptorsGovernanceTestPersistenceBridgeGovernanceTest*Mapper classes are final [ERR-107].
assertMappersPackagePrivateInterceptorsGovernanceTestPersistenceBridgeGovernanceTest*Mapper classes are not public [ERR-107].
assertNoAnonymousClassesBusinessGovernanceTestInterceptorsGovernanceTestPersistenceBridgeGovernanceTestPersistenceGovernanceTestToolsGovernanceTestNo anonymous class in production [GOV-001].
assertNoDependencyOnBusinessBoundaryTestInterceptorsBoundaryTestAsserts that classes in modulePackage do not depend on forbiddenPackage.
assertNoFieldInjectionBusinessBoundaryTestInterceptorsBoundaryTestJobServiceGovernanceTestPersistenceBridgeGovernanceTestStudioServiceGovernanceTestNo @Autowired field injection [GOV-005] — krizaka-test-support's rule.
assertNoForeignTier3DependencyAutomationServiceGovernanceTestJobServiceGovernanceTestKnowledgeServiceGovernanceTestStudioServiceGovernanceTest[SEAM-002] Asserts an autonomous service depends on no bounded context's Tier-3 (owned-domain) implementation.
assertNoPackKeyConditionalsAutomationServiceGovernanceTestBusinessGovernanceTestEdgeGovernanceTestInterceptorsGovernanceTestJobServiceGovernanceTestKnowledgeServiceGovernanceTestRouterGovernanceTestStudioServiceGovernanceTest[PACK-003] Fails when engine code branches on one of those identifiers — inline, or through a constant declared in the same file.
assertNoPackKeyLiteralsAutomationServiceGovernanceTestBusinessGovernanceTestEdgeGovernanceTestInterceptorsGovernanceTestJobServiceGovernanceTestKnowledgeServiceGovernanceTestRouterGovernanceTestStudioServiceGovernanceTest[PACK-002] Fails when a pack, studio, or pack-capability key appears as a literal in engine code under orazaka-libs/, orazaka-apps/services/ or orazaka-apps/workers/**.
assertNoPermitAllOnInternalOrUploadsJobServiceGovernanceTestKnowledgeServiceGovernanceTestRouterGovernanceTestStudioServiceGovernanceTestFails when a SecurityConfig opens /internal/** or /uploads/**.
assertNoRedundantPrefixBusinessGovernanceTestInterceptorsGovernanceTestJobServiceGovernanceTestPersistenceBridgeGovernanceTestPersistenceGovernanceTestStudioServiceGovernanceTestToolsGovernanceTestNo class name starts with Orazaka [ERR-104].
assertNoStandardStreamsBusinessGovernanceTestInterceptorsGovernanceTestJobServiceGovernanceTestPersistenceBridgeGovernanceTestPersistenceGovernanceTestStudioServiceGovernanceTestToolsGovernanceTestNo class writes to standard streams [GOV-004] — krizaka-test-support's rule.
assertNoWebControllersBusinessGovernanceTestInterceptorsGovernanceTestPersistenceBridgeGovernanceTestPersistenceGovernanceTestToolsGovernanceTestNo web controller in the module [ERR-112].
assertOneCapabilityModelJobServiceGovernanceTest[CAP-001] One record models a capability, and the projections of it say so.
assertOneDeclarationAuthorStudioServiceGovernanceTest[SAGA-002] One author resolves what a dispatched step carries from its pack.
assertOneSettlementAuthorStudioServiceGovernanceTest[SAGA-001] One author closes a run's credit hold.
assertOneTopLevelClassPerFileBusinessGovernanceTestInterceptorsGovernanceTestJobServiceGovernanceTestPersistenceBridgeGovernanceTestPersistenceGovernanceTestStudioServiceGovernanceTestToolsGovernanceTestEvery top-level class lives in a file named after it [ERR-103] — krizaka-test-support's rule.
assertOutboxRelaysClaimJobServiceGovernanceTest[KIT-003] An outbox store claims the rows the relay publishes, and the relay has one author.
assertPersistenceAdapterPackageKindnoneadapter/persistence holds only *Adapter/*Mapper [ERR-130].
assertPersistencePackageHygienePersistenceGovernanceTestJPA converters, entities and repositories live in their sub-packs [ERR-109].
assertSagaReadersDoNotWriteStudioServiceGovernanceTest[SAGA-003] The saga's read-only invariants stay read-only.
assertSecurityBaselineIsUniformJobServiceGovernanceTest[KIT-001] Every service's filter chain starts from the one security baseline.
assertServicePackageOnlyServicesJobServiceGovernanceTestStudioServiceGovernanceTestToolsGovernanceTestapplication/service holds only capability-named *Service classes [ERR-129] — krizaka-test-support's rule.
assertSessionSecurityHasOneAuthorJobServiceGovernanceTest[KIT-004] Session-token security has one author: krizaka-security.
assertStrictHexagonalBoundariesToolsGovernanceTest[HEX-001] Enforces strict hexagonal layer dependencies using ArchUnit's layeredArchitecture.
assertSupportPackageHygienenoneAsserts infrastructure.support holds only cross-cutting helpers / shared plumbing — never a use-case *Service, a *Controller/*Adapter, or config [ERR-130].
assertVirtualThreadsEnabledAutomationServiceGovernanceTestEdgeGovernanceTestJobServiceGovernanceTestKnowledgeServiceGovernanceTestRouterGovernanceTestStudioServiceGovernanceTestA service that serves HTTP runs on virtual threads (AGENTS.md §4).

GovernanceSubjects

RuleEnforced bySummary
assertEveryRuleIsNonVacuousGovernanceSubjectsTest[GOV-006] Asserts every governance rule in this package is non-vacuous by construction.

LaneCoherenceRules

RuleEnforced bySummary
assertEveryCapabilityDeclaresItsLaneJobServiceGovernanceTest[LANE-001] Every seeded capability whose routing key a lane binds declares that lane's class.

LoggedContentRules

RuleEnforced bySummary
assertNoLoggingCallTakesContentAutomationServiceGovernanceTestEdgeGovernanceTestGovernanceTestJobServiceGovernanceTestKnowledgeServiceGovernanceTestRouterGovernanceTestStudioServiceGovernanceTestAsserts [LOG-001] over the given classes: no argument of a logging call is, or was derived from, a prompt, a response body or a message text.

MeteringMarkerRules

RuleEnforced bySummary
assertEveryJobProducerDeclaresItsMeteringMeteringMarkerTestAsserts that every class publishing to the jobs exchange stamps #MARKER or is exempt with a written reason.

PackCoherenceRules

RuleEnforced bySummary
assertPackCatalogueIsCoherentSqlBoundaryTestAsserts the pack catalogue is coherent: infra/initdb seeds no pack, and no bundle manifest declares a pack the database would refuse.

RunSurfaceRules

RuleEnforced bySummary
assertNoInboundEntryDispatchesAJobEdgeGovernanceTestJobServiceGovernanceTestKnowledgeServiceGovernanceTestRouterGovernanceTestStudioServiceGovernanceTestAsserts [DOOR-001] over this module's production classes, against the whole repository's sinks.

SourceFileScanner

RuleEnforced bySummary
assertNoBannedLiteralsEdgeGovernanceTestScans Java source files under sourceRoot for default banned patterns [GOV-003].
assertNoEnvironmentInjectionAutomationServiceGovernanceTestBusinessGovernanceTestEdgeGovernanceTestGovernanceTestInterceptorsGovernanceTestJobServiceGovernanceTestKnowledgeServiceGovernanceTestPersistenceBridgeGovernanceTestPersistenceGovernanceTestRouterGovernanceTestStudioServiceGovernanceTestToolsGovernanceTestScans for org.springframework.core.env.Environment imports in non-@Configuration classes [ERR-113].

SqlBoundaryRules

RuleEnforced bySummary
assertNoCrossContextForeignKeysSqlBoundaryTestAsserts that every REFERENCES in every *.sql file under initdbDir targets a table created in the same file (same bounded context).

Présentation du produit →

Sur cette page