Constraints and Conventions
Specify architectural constraints and shared conventions.
Constraints and Conventions
Use these blocks to formalize architectural limits and team agreements.
Syntax
Sruja uses flat syntax - all declarations are top-level, no wrapper blocks needed:
import { * } from 'sruja.ai/stdlib'
// Constraints using flat syntax
constraints {
"No direct WebApp -> DB writes"
"Only managed Postgres for relational data"
}
// Conventions using flat syntax
conventions {
"kebab-case for services"
"W3C trace context propagated across services"
}
Guidance
- Use
constraintsfor firm boundaries (security, compliance, architecture). - Capture team
conventionsto improve consistency across services.
Related
policyfor governance documentsadrfor rationale behind constraints