18 CANON LAWS · DOC 09 + 11 + 12 + 13

18 Canon Laws

6 Core · 6 Crystal · 6 Deep. 9 hukum KRITIKAL. Setiap law punya technical binding ke kode runtime. "Framework is commodity, Canon is moat."

Core LawsLaw 1–6
6

Fondasi non-negotiable: human intent, ledger, discipline, tech boundary.

Crystal LawsLaw 7–12
6

Commercial & isolation rules: proof before scale, tenant isolation, pricing moat.

Deep LawsLaw 13–18
6

Agent runtime enforcement: approval gate, budget, escalation, ledger logging.

Core Laws (Law 1–6)

Fondasi non-negotiable: human intent, ledger, discipline, tech boundary.

#1

Human Intent Remains Layer 1

COREKRITIKAL
Statement

"Keputusan strategis tetap di manusia. AI propose, human disposes. Copilot never auto-executes."

Technical Binding

approval_gate mandatory pada setiap write action; Copilot propose-only mode

Enforced in
Layer D ledgerFounder Console approval flowai-copilot-v1 config
#2

Ledger-First, Reality-First

COREKRITIKAL
Statement

"Setiap action tercatat di WORM ledger SEBELUM execute. Bukti > narasi."

Technical Binding

governance_events append dulu, baru tool call; bypass = abort

Enforced in
Layer DCloudflare Queues → governance_events
#3

Plan Before Build

CORETINGGI
Statement

"Setiap fitur/refactor butuh ADR atau plan entry sebelum coding dimulai."

Technical Binding

PR template mandatory ADR reference; docs/adr/ADR-NNN.md

Enforced in
GitHub PR templatedocs/adr/
#4

Commit Discipline

CORESEDANG
Statement

"Conventional commits, scoped, atomic. Tidak ada "WIP" di main branch."

Technical Binding

commitlint config + pre-push hook; main = production

Enforced in
.husky/commitlint.config.cjswrangler deploy
#5

No Node.js APIs in Workers

COREKRITIKAL
Statement

"Cloudflare Workers hanya Web APIs. No fs, no path, no child_process."

Technical Binding

tsconfig types = @cloudflare/workers-types; serveStatic dari hono/cloudflare-workers

Enforced in
tsconfig.jsonvite build
#6

Layer Isolation

CORETINGGI
Statement

"Satu repo = satu dominant layer (Hub/L1/L2/L3/L4). No cross-layer import."

Technical Binding

boundaries/BOUNDARIES-*.md per repo; ESLint import/no-restricted-paths

Enforced in
repo-product-map.jsonBOUNDARIES-*.md

Crystal Laws (Law 7–12)

Commercial & isolation rules: proof before scale, tenant isolation, pricing moat.

#7

Proof Before Scale (Ring Boundary)

CRYSTALTINGGI
Statement

"Max 2 adjacent Ring per repo. P4 butuh 3 paid case studies prerequisite."

Technical Binding

repo-product-map.rings length ≤ 2 + adjacency check; P4 gate di CRM

Enforced in
repo-product-map.json guardsRing 7 advisory CRM
#8

Hub Referensi Tunggal + Tenant Isolation

CRYSTALKRITIKAL
Statement

"Hanya webapp yang Hub. Semua query D1/KV/R2 WAJIB include tenant_id."

Technical Binding

middleware tenantIsolationGuard; D1 RLS policy per tenant

Enforced in
webapp middlewareSovereign-os-platform D1 schema
#9

Sell Per Layer (No Cross-Layer Bundle SKU)

CRYSTALTINGGI
Statement

"Invoice WAJIB breakdown per-SKU kanonik. Package = commercial wrapper only."

Technical Binding

invoice template mandatory SKU list; package-map canon_compliance_matrix

Enforced in
Xendit invoice templateP1–P4 package spec
#10

Canon Freeze During Freeze Window

CRYSTALKRITIKAL
Statement

"Tidak boleh ubah pricing/canon tanpa ADR dan founder sign-off. Freeze aktif hingga 2026-10-22."

Technical Binding

docs/canon/ immutable selama freeze; ADR-NNN diperlukan untuk unfreeze

Enforced in
docs/canon/ protection ruleprice_freeze_until metadata
#11

Pricing Discipline (Moat Protection)

CRYSTALKRITIKAL
Statement

"T5 discount max 20% butuh founder email/e-signature. Governance platform ≠ commodity."

Technical Binding

pricing_rules.discount_approval_required = true untuk P4/T5

Enforced in
package-map canon_compliance_matrixSales CRM approval flow
#12

Deployment Canon (1 Repo = 1 Pages Project)

CRYSTALTINGGI
Statement

"Setiap repo = 1 Cloudflare Pages project. Main branch = production. No monorepo fusion."

Technical Binding

wrangler.jsonc per repo; deploy hanya dari main

Enforced in
wrangler.jsoncGitHub Actions deploy workflow

Deep Laws (Law 13–18)

Agent runtime enforcement: approval gate, budget, escalation, ledger logging.

#13

Human Confirmation Gate Mandatory

DEEPKRITIKAL
Statement

"Semua action dengan side-effect butuh JWT approval_signature + human_confirmed flag."

Technical Binding

approval_signature JWT + human_confirmed flag di governance_events

Enforced in
Layer D governance_eventsLayer C execution graph gate
#14

Budget Guardrails Per Role

DEEPTINGGI
Statement

"Setiap AI-role punya daily+monthly USD budget. Exceed = auto-pause + notify founder."

Technical Binding

ai_role_budget_usage table + KV counter realtime; hard cap enforcement

Enforced in
Layer A Role RegistryLayer B Work Queue budget check
#15

Escalation Trigger = Immediate Founder Alert

DEEPTINGGI
Statement

"Anomali material (P1 incident, competitor move, brand voice violation x3, enterprise sentiment negatif) → push notif langsung."

Technical Binding

escalation config per role; Cloudflare Queues → push service

Enforced in
ai_roles.escalationLayer E push notification
#16

AI-Role is Payload, Not SKU

DEEPKRITIKAL
Statement

"AI-Role tidak pernah dijual standalone. Selalu attached ke Lane/Tower/Platform/Template."

Technical Binding

sku_matrix.forbidden_combinations standalone_ai_role = reject

Enforced in
package-map ai_roles_coreXendit invoice validator
#17

Every Agent Action Logs to Ledger

DEEPKRITIKAL
Statement

"Setiap tool call, approval, handoff, eskalasi → append ke governance_events. Tanpa pengecualian."

Technical Binding

Cloudflare Queues → governance_events append; hash chain SHA256

Enforced in
Layer Dsemua tool wrappers
#18

Framework is Commodity, Canon is Moat

DEEPSEDANG
Statement

"Framework (LangGraph, OpenAI SDK, smolagents) swap-able via ADR. Canon enforcement INDEPENDEN framework."

Technical Binding

Canon check di Layer A & D runtime, bukan framework-dependent

Enforced in
Layer A validatorLayer D policy engine

Quick Reference Matrix

All 18 laws at a glance

#NameClassSeverityEnforced in
#1Human Intent Remains Layer 1COREKRITIKALLayer D ledger, Founder Console approval flow
#2Ledger-First, Reality-FirstCOREKRITIKALLayer D, Cloudflare Queues → governance_events
#3Plan Before BuildCORETINGGIGitHub PR template, docs/adr/
#4Commit DisciplineCORESEDANG.husky/, commitlint.config.cjs
#5No Node.js APIs in WorkersCOREKRITIKALtsconfig.json, vite build
#6Layer IsolationCORETINGGIrepo-product-map.json, BOUNDARIES-*.md
#7Proof Before Scale (Ring Boundary)CRYSTALTINGGIrepo-product-map.json guards, Ring 7 advisory CRM
#8Hub Referensi Tunggal + Tenant IsolationCRYSTALKRITIKALwebapp middleware, Sovereign-os-platform D1 schema
#9Sell Per Layer (No Cross-Layer Bundle SKU)CRYSTALTINGGIXendit invoice template, P1–P4 package spec
#10Canon Freeze During Freeze WindowCRYSTALKRITIKALdocs/canon/ protection rule, price_freeze_until metadata
#11Pricing Discipline (Moat Protection)CRYSTALKRITIKALpackage-map canon_compliance_matrix, Sales CRM approval flow
#12Deployment Canon (1 Repo = 1 Pages Project)CRYSTALTINGGIwrangler.jsonc, GitHub Actions deploy workflow
#13Human Confirmation Gate MandatoryDEEPKRITIKALLayer D governance_events, Layer C execution graph gate
#14Budget Guardrails Per RoleDEEPTINGGILayer A Role Registry, Layer B Work Queue budget check
#15Escalation Trigger = Immediate Founder AlertDEEPTINGGIai_roles.escalation, Layer E push notification
#16AI-Role is Payload, Not SKUDEEPKRITIKALpackage-map ai_roles_core, Xendit invoice validator
#17Every Agent Action Logs to LedgerDEEPKRITIKALLayer D, semua tool wrappers
#18Framework is Commodity, Canon is MoatDEEPSEDANGLayer A validator, Layer D policy engine