BATEN CODE
Universal Notary for Source Code

Most code works — until it doesn't.

BATEN CODE measures what other tools don't: the structural integrity of your codebase. Free. Local. Deterministic. No cloud. No opinion.

Why determinism matters

The problem with "it works"

The modern software stack has many tools that check style, suggest completions, and catch syntax errors. What they don't do is measure structural integrity: whether the code, as an architecture, is fundamentally sound.

A deterministic system produces the same output for the same input — every time, without hidden side effects. In practice, non-determinism shows up as:

Functions that silently fail  ·  Memory that leaks gradually  ·  Logic paths that are never tested  ·  Complexity that compounds until a system breaks under load

These are not style issues. They are structural risks — and they are invisible to linters, AI assistants, and code review alone.


What is BICS?

Baten Invariant Certification System

BICS is the methodology behind BATEN CODE. It defines 8 structural invariants that every sound codebase should respect. Each invariant has a threshold. The integrity score reflects how far a project is from meeting all 8.

FTH-1 · CRITICAL
Memory Safety
Buffer overflow, use-after-free, code injection — exploitable vulnerabilities.
FTH-2 · HIGH
Unsafe API
Dangerous calls without bounds checking — strcpy, gets, eval().
FTH-3 · HIGH
Error Handling
Silent failure paths — ignored return values, bare except clauses.
FTH-4 · MEDIUM
Function Length
Functions that accumulate hidden state — over 50–80 lines.
FTH-5 · MEDIUM
Nesting Depth
Logic that cannot be traced — nesting depth over 4.
FTH-6 · MEDIUM
Cyclomatic Complexity
Uncontrollable branching — functions with too many decision paths.
FTH-7 · LOW
Parameter Count
Interfaces that resist testing — over 5–7 parameters per function.
FTH-8 · LOW
Style & Readability
Magic numbers, unnamed constants — code that resists review.

How the score works

Transparent. Reproducible. Proportional.

The integrity score is not an opinion. It is computed by a fixed formula, applied identically to every project.

Base score = (clean files / total files) × 100
Density penalty = (CRITICAL × 4 + HIGH × 1), capped at 50% of base
Final score = base − density penalty

A project with 750 clean files out of 800 starts at 93% before any penalty. One unsafe function does not condemn the whole codebase. MEDIUM and LOW violations are captured through the contamination ratio — they lower the base without triggering the severity penalty.


The D7_SEAL — certified act

When your score reaches STABLE (≥ 80%), you can request a D7_SEAL — a cryptographic proof that your code passed the BICS standard at a given point in time.

D7_SEAL {
  project: "my-project"
  hash: sha3(source_tree)
  score: 84% — STABLE
  standard: BICS v1.0.27
  issued_at: 2026-06-18T14:32:00Z
  issued_by: batencore.com
  signature: [baten_crypto RSA-4096]
}

Used for: client deliveries · patent filings · regulatory compliance · team accountability.
Verifiable independently at batencore.com/cert


Who uses BATEN CODE
Developer
Audit any file or project locally. Get an instant integrity score with actionable violations.
Tech Lead / CTO
Establish a shared quality baseline. Require D7_SEAL on deliverables before client handoff.
Security team
Systematic scan for unsafe APIs, unchecked allocations, and injection vectors — in CI/CD.
Open source maintainer
Run the same audit on your repo that we ran on Redis, Linux, OpenSSL, and Git.
Patent filing
D7_SEAL accepted as technical evidence of code state at a given date — INPI, EPO.
Compliance
Traceable audit trail for ISO 27001, SOC 2, NIS2 — proof of structural review.

Start now — free, local, no cloud
Same engine. Same method. Any project, any size.
Install the VS Code extension or download the standalone engine.