CREWLOOMSOVEREIGN
Sovereign AI Coding Engine
CapabilitiesArchitectureLive DemoSpecialist SkillsQuickstartArticles
  1. Home
  2. Research & Articles
  3. The Model Proposes, Deterministic Code Decides: Control Philosophy & Artifact Taxonomy
Back to all publications
Engineering Architecture•2026-11-16•9 min read

The Model Proposes, Deterministic Code Decides: Control Philosophy & Artifact Taxonomy

Why prompt engineering alone fails at production scale, and how Crewloom enforces deterministic safety via the CPS-1 Protocol Standard and a 9-tier Artifact Taxonomy.

By Crewloom Systems Architecture & Governance Council
#Agent Architecture#Deterministic AI#Artifact Taxonomy#CPS-1#Prompt Engineering#AI Safety

The Crisis of Probabilistic Autonomy in Modern AI Agents

In conventional autonomous coding frameworks, developers rely on sprawling system prompts, hoping an LLM will consistently obey complex rules like *"never drop tables"*, *"keep files under 800 lines"*, or *"always write tests before code"*. At enterprise scale, this prompt-only paradigm routinely collapses under stochastic drift, adversarial edge cases, and attention decay across extended context windows.

At Crewloom (https://crewloom.org), we operate under a foundational axiom inspired by aerospace avionics and fault-tolerant distributed systems:

> "The Model Proposes, Deterministic Code Decides."

> *"Prompt instructions are stochastic requests—not architectural guarantees."*

True software reliability requires hard boundary isolation where probabilistic neural networks generate hypotheses and candidate diffs, but zero mutations occur without deterministic code enforcement (compilers, AST linters, typecheckers, and sandboxes).

---

The 9-Tier Artifact Taxonomy

To prevent architectural entropy, every element governing AI agent behavior in Crewloom is strictly classified into exactly one of nine invariant categories:

Artifact TypeGoverning ConcernEnforcement LevelLoading LifecycleConcrete Example
1. ConstitutionImmutable operational laws & sovereigntyDeterministic + Human ReviewPermanent in every sessionCONSTITUTION.md (Arts. I-VII)
2. RuleStateless invariant on any outputAdvisory + Guard detectionAlways-on, ultra-dense (<2k tokens)No any, No inline ternaries
3. ContractDeterministic interface between boundaries100% Typed (TypeScript / Rust / JSON Schema)In source code contractsResult<T, E>, ProtocolContract
4. ProtocolStateful, multi-step pipeline with gatesAdvisory + Deterministic GatesTriggered on-demandFeature Engineering Protocol (FEP)
5. SkillDomain procedure & procedural expertiseAdvisory (Selective Knowledge)Loaded on-demand per task (<20k budget)tdd, distributed-systems
6. RoleAgent identity & explicit tool/skill allowlistDeterministic (Kernel Allowlist)Bound at agent instantiationLead Architect, Verifier, Builder
7. MemoryTiered factual knowledge (Data, not instructions)Retrieval-only via Vectors/HologramsQuery-time injectioncore/Brain/, Active HRPE $H$
8. Guard / HookSilent mechanical barrier outside the LLMDeterministic (Fail-Closed)Pre/Post-execution hookscheck-architecture.mjs, DLP
9. EvalEmpirical ground-truth measurement suiteObjective computationCI / Pre-merge gatesSandbox pass/fail, Wilson 95% CI

---

Crewloom Protocol Standard (CPS-1): Zero "Written-Not-Wired"

A common anti-pattern in modern AI infrastructure is the proliferation of markdown "protocols" that exist solely as wishful documentation. In Crewloom, the CPS-1 Standard (agent/packages/crewloom/contracts/src/protocol.ts) defines a protocol as a formal finite-state machine requiring five mandatory fields:

1. Trigger (`trigger`): The exact, unambiguous event that activates the pipeline.

2. Ordered Pipeline (`pipeline`): Sequential stages where every intermediate step must pass an automated, non-LLM verification gate before proceeding.

3. Deterministic Exit Condition (`exit_condition`): A boolean assertion verifiable by terminal exit codes, AST checks, or cryptographic manifests.

4. Failure Remediation (`on_failure`): Explicit fail-closed routing and halt codes.

5. Sovereign Owner (`owner`): Exactly one source file designated as the single source of truth.

typescript
export interface ProtocolContract {
  readonly id: string;
  readonly name: string;
  readonly anchor: {
    readonly pillar: 'core' | 'bridge' | 'agent' | 'pulse';
    readonly constitution_ref: string;
    readonly memory_tier: 1 | 2 | 3 | 4;
  };
  readonly governance: {
    readonly status: 'draft' | 'active' | 'deprecated';
    readonly enforcement: 'advisory' | 'hybrid' | 'deterministic';
    readonly guard?: string;
  };
  readonly contract: {
    readonly trigger: ProtocolTrigger;
    readonly pipeline: readonly ProtocolPipelineStep[];
    readonly exit_condition: ProtocolExitCondition;
    readonly on_failure: ProtocolOnFailure;
  };
}

Context Economy: The 20k Token Working Budget

Injecting dozens of skills into a system prompt degrades reasoning accuracy and inflates API costs exponentially. Crewloom enforces strict Context Economy:

  • Only the Constitution and active Rules reside permanently in the context (< 15k tokens).
  • Domain Skills are dynamically activated and unloaded per mission.
  • Long-term state is offloaded to the HRPE Holographic Memory Bank ($O(1)$ memory envelope) rather than bloating the LLM prompt window.

By combining deterministic code guards with structured protocols, Crewloom transforms probabilistic language models into FAANG-grade autonomous engineering partners.

النسخة العربية الكاملة٩ دقائق قراءة

النموذج يقترح والكود الحتمي يُقرر: فلسفة التحكم وهرمية عناصر السلوك في كرو لوم

لماذا تفشل هندسة الأوامر وحدها في بيئات الإنتاج الكبرى، وكيف تفرض كرو لوم الحتمية والأمان البرمجي عبر معيار CPS-1 وتصنيف العناصر التساعي.

أزمة الاعتماد على الأوامر النصية وحدها في وكلاء الذكاء الاصطناعي

في أطر عمل الوكلاء البرمجيين التقليدية، يعتمد المهندسون على كتابة نصوص توجيه ضخمة (System Prompts) على أمل أن يلتزم النموذج بقواعد حرجة مثل: *"إياك ومسح الجداول"*، أو *"حافظ على الملفات أقل من 800 سطر"*، أو *"اكتب الاختبارات أولاً"*. في بيئات الإنتاج الحقيقية، ينهار هذا الأسلوب تماماً نتيجة التشتت الإحصائي وتآكل الانتباه في السياقات الطويلة.

في كرو لوم Crewloom (https://crewloom.org)، ننطلق من قاعدة ذهبية مستلهمة من أنظمة الطيران وهندسة النظم الموزعة عالية الموثوقية:

> «النموذج يقترح، والكود الحتمي يُقرر» (The Model Proposes, Deterministic Code Decides)

> *«نصوص الـ Prompt طلبات إحصائية وليست ضمانات معمارية هندسية.»*

تتطلب الموثوقية الهندسية الحقيقية فصلاً قاطعاً للحدود: يقترح النموذج الفرضيات والتعديلات البرمجية، لكن لا يُعتمد أي تعديل دون مصادقة كود حتمي خارجي (مترجمات اللغات، فحص شجرة الصرف والنحو AST، واختبارات الصناديق المعزولة).

---

هرمية عناصر التحكم التساعية (Artifact Taxonomy)

لمنع الفوضى الهندسية، يُصنف كل عنصر يوجه سلوك الوكلاء في Crewloom بدقة متناهية ضمن تسعة عناصر حصرية:

نوع العنصرمسؤوليته الجوهريةطبيعة الإنفاذدورة التحميل في الذاكرةمثال حي من المستودع
1. الدستور (Constitution)القوانين العليا وميثاق عدم الهدمحتمي + مراجعة بشريةدائم في كافة الجلساتCONSTITUTION.md (المواد 1-7)
2. القاعدة (Rule)قيد ثابت بلا حالة على أي مخرجاسترشادي + فحص حارسدائم ومكثف (<2k توكن)منع any، منع الشرطيات المضمنة
3. العقد (Contract)واجهة برمجية نمطية بين المكوناتحتمي 100% عبر Typesداخل كود المصدرResult<T, E>، ProtocolContract
4. البروتوكول (Protocol)مسار عمل تسلسلي ذو حالة وبواباتاسترشادي مدعوم ببوابات حتميةيُستدعى بحدث محددبروتوكول هندسة الميزات (FEP)
5. المهارة (Skill)دليل إجرائي ومعرفة تخصصيةاسترشادي (معرفة انتقائية)عند الطلب (<20k ميزانية)مهارة tdd، النظم الموزعة
6. الدور (Role)هوية الوكيل وقائمة الأدوات المسموحةحتمي عبر Allowlistيُقفل عند تشغيل الوكيلالمعماري، المحقق، الباني
7. الذاكرة (Memory)وقائع وحقائق متراكمة (بيانات لا تعليمات)استرجاعي عبر المتجهاتيُسترجع عند الحاجةالعقل المركزي core/Brain/
8. الحارس (Guard / Hook)كود برمجي خارجي صامت يحظر الخطأحتمي ميكانيكي (Fail-Closed)قبل وبعد تنفيذ الأوامرأداة check-architecture.mjs
9. التقييم (Eval)بوابات قياس موضوعية خارجيةحساب رياضي واختباراتبوابات ما قبل الدمج والـ CIاختبارات النجاح/الفشل، مجال 95%

---

معيار بروتوكول كرو لوم (CPS-1): حظر "المكتوب غير المربوط"

إحدى الآفات الشائعة في هندسة الذكاء الاصطناعي هي كثرة وثائق البروتوكولات النظرية التي لا يدعمها كود فعلي. يفرض معيار CPS-1 في كرو لوم (protocol.ts) خمسة أركان حتمية لأي بروتوكول معتمد:

1. المحفز (Trigger): الحدث الدقيق الذي يطلق البروتوكول آلياً.

2. خط الأنابيب المتسلسل (Pipeline): مراحل مرتبة تفصل بينها بوابات فحص حتمية ترفض التقدم دون نجاح خطي.

3. بوابة الخروج الحتمية (Exit Condition): شرط برهاني يُفحص بأمر تيرمينال أو مخطط Schema.

4. معالجة الفشل (On-Failure): خطة محددة مسبقاً للتعامل مع الانهيار وتفعيل كود التوقف الحتمي.

5. الملف المالك (Owner): ملف مرجعي وحيد يمثل مصدر الحقيقة المطلق.

اقتصاد السياق: ميزانية الـ 20 ألف توكن

يؤدي حشو عشرات المهارات في الـ System Prompt إلى تدهور تركيز النموذج ورفع تكلفة الاستدعاء. تطبق كرو لوم ميزانية اقتصاد السياق:

  • الدستور والقواعد الأساسية فقط تبقى دائمة في السياق (< 15 ألف توكن).
  • المهارات التخصصية تُستدعى وتُفرغ ديناميكياً بحسب المهمة المطروحة.
  • المعرفة التراكمية تُرحل إلى بنك الذاكرة الهولوغرافية HRPE ذي الحجم الثابت الحتمي (524 KiB) بدلاً من ملء سياق النموذج بالنصوص المتكررة.
CL

Crewloom Systems Architecture & Governance Council

Research and Engineering division of Crewloom Autonomous Systems, developing sovereign zero-destruction runtime foundations for next-generation developer tooling.

Ready to experience Sovereign AI Coding?

Install Crewloom in seconds on your Mac or Linux workstation with Zero-Destruction verification.

Install Crewloom FreeTry Live Simulator
On this page
  • The Crisis of Probabilistic Autonomy in Modern AI Agents
  • The 9-Tier Artifact Taxonomy
  • Crewloom Protocol Standard : Zero "Written-Not-Wired"
  • Context Economy: The 20k Token Working Budget
CREWLOOM SOVEREIGN
•| © 2026 Rumuze (رموز). All rights reserved.
Articles & ResearchAgent Source CodeGitHub OrganizationOfficial Sitesupport@crewloom.org