sg-sentinel.sgit.ai / documents / codebase-extension
SG/Sentinel As An Extension Of The Codebase: Type-Safe Validation, Agentic Development, And Security Zones
Summary
Security as part of the codebase, not a separate bolted-on tool — possible now because agentic development, local-everywhere and owned code removed the barriers (licensing, deployment friction, the local-production gap) that always made it fail before. Type-safe runtime validation is the mechanism: security logic is disproportionately validation logic, and a type-safe boundary at the edge means everything behind it can trust the data — security at the edge reduces complexity everywhere behind the edge. Sentinel is, architecturally, the application's trust boundary; horses-for-courses places each check at its right altitude.
Key concepts
- Sentinel as the trust boundary — untrusted outside, validation at the boundary, trusted inside
- Type_Safe as the validation mechanism — the same discipline the codebase uses internally, applied at the edge — visible in every schema
- The agentic development model — developer, AppSec, QA and architect agents working the same locally-runnable code
Key ideas
- Validation happens once at the boundary; downstream code stops re-validating defensively.
- Developer-friendliness and security quality are the same thing viewed from two angles.
- Codebase-continuous does not mean review-light: the trust-boundary code is the most-reviewed code.
On this site
Why every schema in the code snapshot is Type_Safe; the conventions box on the code page.
Read the document
📄 Original document · v0.27.58 · 18 May 2026 · rendered from the raw markdown (the source of truth)