arifOS — Constitutional AI Governance

io.github.ariffazil由 GitHub 账号 ariffazil 发布v2026.03.22更新于 Oct 24, 2026

Constitutional AI governance: 11 mega-tools, 13 floors, VAULT999 ledger. Human-in-loop by design.

已验证Streamable HTTP可网页运行知识与记忆安全与监控AI 与机器学习

概览

AI 生成的概览

一个远程宪政治理内核,为助手提供绑定会话的观察、推理、裁决、执行与封存工具链,并配有不可变账本。

可以做什么
启动、恢复或检查受治理的内核会话,绑定操作者身份与审计链,并返回其他工具所需的会话令牌。通过网页搜索、带来源记录的网址抓取或内核遥测收集证据,并执行按认知类型标注的结构化推理。将自然语言意图路由到专门模块,并记录、召回、修订或遗忘分层记忆条目。对候选操作或主张作出裁决并返回完整理由链。仅在持有已封存裁决时执行变更,可先试运行,并向不可变账本追加永久条目。在代理之间提交和读取报告。
适用场景
适合希望助手的操作经过明确的裁决与审批流程、并保留推理记录、证据来源和永久审计轨迹的场景,而非直接执行工具。也适合代理间协作与记录留存,前提是接受不可撤销的条目。
运行要求
远程 streamable HTTP 端点;未声明软件包、环境变量或请求头,也未声明身份验证。其他工具需要初始化工具返回的会话令牌。README 中的自托管方式涉及 Docker 以及 Ollama、Redis、PostgreSQL 和 Qdrant 服务。
安装前请注意
封存工具会向不可编辑、不可删除的不可变账本追加条目,并要求显式确认不可逆性。记忆的提升与遗忘操作需要人工批准。执行工具在存在已封存裁决后会应用变更,建议先查看试运行计划。观察工具的搜索与抓取会把查询和网址发送到远程服务及第三方。

安装

在 SourceWeft 中

  1. 打开 控制台中的 arifOS — Constitutional AI Governance,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.ariffazil%2Farifosmcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "arifos-constitutional-ai-governance": {
      "type": "http",
      "url": "https://arifosmcp.arif-fazil.com/mcp"
    }
  }
}

README

arifosmcp — Constitutional MCP Server Implementation

DITEMPA BUKAN DIBERI — Forged, Not Given [ΔΩΨ | ARIF]

VERSION: 2026.03.28-SEALED | STATUS: SOVEREIGNLY SEALED | AUTHORITY: 888_JUDGE


🔗 CANONICAL LINKS (Source of Truth)

Live Services

ServiceURLPurpose
MCP Endpointhttps://arifosmcp.arif-fazil.com/mcpMain API
Health + Toolshttps://arifosmcp.arif-fazil.com/healthCapability map
Tool Explorerhttps://arifosmcp.arif-fazil.com/toolsInteractive browser

GitHub Repositories


📋 CANONICAL DOCUMENTS (Architecture Reference)

DocumentPathPurpose
arifOS README../README.mdVision, architecture, snapshot of truth
000_CONSTITUTION.md../000/000_CONSTITUTION.mdThe 13 Floors — F1-F13
K_FORGE.md../000/ROOT/K_FORGE.mdPre-deployment evolution
K_FOUNDATIONS.md../000/ROOT/K_FOUNDATIONS.md99-domain math
AGENTS.md../AGENTS.mdAI agent behavior rules
philosophy_atlas.json../data/philosophy_atlas.json27-zone quotes

🎯 SNAPSHOT OF TRUTH

What is arifosmcp?

arifosmcp is the implementation of the arifOS constitutional intelligence kernel — the actual code that enforces the 13 Floors, runs the 000-999 pipeline, and delivers the 11 mega-tools.

The Parent vs. This Document:

arifOS READMEarifosmcp README (this)
WHY — Vision, philosophy, strategic architectureHOW — Implementation, code, deployment mechanics
What it meansHow it works
Strategic contextTechnical specification
Human readableHuman + AI readable

Core Function:

mermaid
graph LR    A["User Request"] --> B["MCP Protocol"]    B --> C["Constitutional Filter<br/>(F1-F13)"]    C --> D["Tool Execution"]    D --> E["Audit Log"]        style A fill:#1a1a2e,color:#fff    style B fill:#16213e,color:#fff    style C fill:#0f3460,color:#fff    style D fill:#1a1a2e,color:#fff    style E fill:#16213e,color:#fff

🏗️ ARCHITECTURE OVERVIEW

Entry Points

mermaid
graph TB    A["server.py<br/>Universal Entry"] --> B{"FastMCP Version?"}    B -->|"2.x"| C["server_horizon.py<br/>Proxy Mode<br/>8 tools"]    B -->|"3.x"| D["runtime/server.py<br/>Full Kernel<br/>11 tools"]        style A fill:#1a1a2e,color:#fff    style C fill:#16213e,color:#fff    style D fill:#0f3460,color:#fff

Server Modes

ModeToolsFeaturesEntrypoint
Horizon (Cloud)8Proxied to VPSserver_horizon.py
VPS (Sovereign)12Full kernel, local Ollamaruntime/server.py

🚦 LIVE MCP CONTRACT STATUS

SubsystemConstitutionalOperationalProductionStability
Anchoring✅ Verified✅ Stable✅ ReadyA
Registry✅ Verified✅ Stable✅ ReadyA
Reasoning✅ Verified✅ Hardened✅ ReadyB
Vitals✅ Verified✅ Corrected✅ ReadyB
Diagnostic✅ Verified✅ New✅ ReadyB

🔧 TOOL INVENTORY (12 Mega-Tools)

Tool Reference Table

ToolBandStageConstitutional RoleModes
init_anchor000_INIT000Session anchoring, Ω₀, philosophyinit, state, status, revoke, refresh
arifOS_kernel444_ROUT444Primary metabolic orchestrationkernel, status
apex_soul888_JUDGE888Sovereign verdict and defensejudge, rules, validate, armor, probe
vault_ledger999_SEAL999Immutable ledger (Merkle chain)seal, verify, resolve
agi_mind333_MIND333Constitutional reasoning and synthesisreason, reflect, forge
asi_heart666_HEART666Safety critique, impact simulationcritique, simulate
engineering_memory555_MEM555Governed engineering and contextengineer, write, vector_query
physics_reality111_SENSE111Environmental grounding and timesearch, ingest, atlas, time
math_estimator444_ROUT444Thermodynamic health and vitalscost, health, vitals
code_engineM-3_EXECM-3Sandboxed execution and observationfs, process, net, replay
architect_registryM-4_ARCHM-4Tool discovery and schema cataloglist, read, register
compat_probeM-5_COMPM-5Interoperability and enum auditaudit, probe, ping

📝 TOOL SPECIFICATIONS

init_anchor (000_INIT)

Purpose: Initialize constitutional session.

python
async def init_anchor(    actor_id: str,    declared_name: str,    mode: Literal["init", "seal", "status"] = "init",    thermodynamic_budget: dict = None,    architect_registry: dict = None) -> dict

Returns:

python
{    "session_id": str,               # UUID    "omega_0": float,                # Baseline uncertainty ∈ [0.03, 0.05]    "delta_s": float,                # Baseline entropy    "telos_manifold": dict,          # Telos vector weights    "godel_lock": dict,              # Gödel lock status    "constitutional_context": str,    # AI system prompt    "philosophy": str,                # Selected quote from atlas    "vitality_index": float,         # Ψ score    "verdict_range": str             # "000_SEAL" | "101-499" | "500-899" | "999_VOID"}

architect_registry (000_INIT)

Purpose: Discover tools and constitutional constraints.

python
async def architect_registry() -> dict

Returns:

python
{    "tools": [        {            "name": str,            "band": str,            "stage": int,            "constitutional_constraints": ["F1", "F2", ...],            "input_schema": dict,            "output_schema": dict        }    ],    "total_count": int,    "catalog_hash": str               # SHA-256 integrity}

physics_reality (111_SENSE)

Purpose: Ground queries in real-world data. Prevents hallucinations.

python
async def physics_reality(    query: str,    mode: Literal["time", "search", "reality_check"] = "search",    time_data: dict = None) -> dict

Constitutional Filter: F2 (Truth) — all factual claims require citation.


agi_mind (333_MIND)

Purpose: Constitutional reasoning with three-phase Ollama pipeline.

mermaid
graph TB    A["Query"] --> B["Phase 1: FAST<br/>Quick pattern match"]    B --> C["Phase 2: REFLECT<br/>Deep reasoning"]    C --> D["Phase 3: DECIDE<br/>Action selection"]        B -->|"F4 Clarity<br/>ΔS ≤ 0"| E["Pass/Fail"]    C -->|"F2 Truth<br/>F3 Tri-Witness"| E    D -->|"Constitutional<br/>Prefix"| E        style A fill:#1a1a2e,color:#fff    style B fill:#16213e,color:#fff    style C fill:#0f3460,color:#fff    style D fill:#1a1a2e,color:#fff
python
async def agi_mind(    query: str,    context: dict,    mode: Literal["think", "reflect", "decide"] = "think") -> dict

Three Phases:

PhaseFocusFloors
Phase 1 (FAST)Quick pattern matchF4 Clarity
Phase 2 (REFLECT)Deep reasoningF2 Truth, F3 Tri-Witness
Phase 3 (DECIDE)Action selectionConstitutional prefix

Constitutional Prefix:

CONSTITUTIONAL FRAMEWORK (ΔΩΨ | ARIF):- Δ CLARITY: Reduce entropy. ΔS ≤ 0.- Ω HUMILITY: Stay in bounds. Ω ∈ [0.03, 0.05].- Ψ VITALITY: Every action witnessed.
FLOORS ACTIVE: [F1-F13]

arifOS_kernel (444_ROUT)

Purpose: Primary conductor — orchestrates full 000→888 pipeline.

mermaid
graph LR    A["Query"] --> B["1. Parse Intent<br/>111_SENSE"]    B --> C["2. Ground Reality<br/>physics_reality"]    C --> D["3. Reason<br/>agi_mind"]    D --> E["4. Route Action<br/>444_ROUT"]    E --> F["5. Safety Critique<br/>asi_heart"]    F --> G["6. Estimate Cost<br/>math_estimator"]    G --> H["7. Issue Verdict<br/>apex_soul"]        style A fill:#1a1a2e,color:#fff    style B fill:#16213e,color:#fff    style C fill:#0f3460,color:#fff    style D fill:#1a1a2e,color:#fff    style E fill:#16213e,color:#fff    style F fill:#0f3460,color:#fff    style G fill:#1a1a2e,color:#fff    style H fill:#16213e,color:#fff
python
async def arifOS_kernel(    query: str,    tools: list[str],    context: dict) -> dict

asi_heart (666_HEART)

Purpose: Safety critique — F5 Peace², F9 Ethics, harm potential.

python
async def asi_heart(    action_plan: dict) -> dict

Returns:

python
{    "peace_squared": float,          # Must be ≥ 1.0 (F5)    "c_dark": float,                 # Must be < 0.30 (F9)    "harm_potential": str,           # "NONE" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"    "f5_pass": bool,    "f9_pass": bool,    "recommendations": list[str]}

math_estimator (777_OPS)

Purpose: Thermodynamic cost estimation.

python
async def math_estimator(    operation: str,    inputs: dict) -> dict

Returns:

python
{    "landauer_limit_pJ": float,       # Minimum thermodynamic cost    "entropy_change": float,         # ΔS (must be ≤ 0 for F4)    "coherence_score": float,         # System coherence [0, 1]    "estimated_energy_J": float,      # Total energy estimate    "shannon_entropy_bits": float     # Information entropy}

apex_soul (888_JUDGE)

Purpose: Final constitutional judgment.

python
async def apex_soul(    evidence: dict,    context: dict) -> dict

Returns:

python
{    "verdict": str,                   # "000_SEAL" | "101-499" | "500-899" | "999_VOID"    "floor_scores": {        "F1": {"passed": bool, "score": float},        "F2": {"passed": bool, "score": float},        # ... F3-F13    },    "genius_index": float,            # G = A × P × X × E² (≥ 0.80)    "vitality_index": float,           # Ψ (≥ 1.0 for healthy)    "witness_cube": float,            # W³ (≥ 0.95)    "override_available": bool         # 888_JUDGE can always override}

vault_ledger (999_SEAL)

Purpose: Immutable audit storage with Merkle sealing.

python
async def vault_ledger(    data: dict,    tier: Literal["constitutional", "standard", "transient"] = "standard") -> dict

Tiers:

TierComplianceRetention
constitutionalFull F1-F13Permanent
standardStandard auditImmutable
transientEphemeralAuto-purged

engineering_memory (555_MEM)

Purpose: Redis-backed session memory.

python
async def engineering_memory(    key: str,    operation: Literal["get", "set", "delete", "list"],    value: any = None,    ttl: int = 3600) -> dict

code_engine (—)

Purpose: Constrained Python execution for tool actions.

python
async def code_engine(    code: str,    language: Literal["python", "javascript"] = "python",    constraints: dict = None) -> dict

Safety Constraints:

  • No filesystem access
  • No network access
  • No subprocess creation
  • Memory limit: 128MB
  • Timeout: 30s

🌐 API ENDPOINTS

HTTP Endpoints

EndpointMethodPurpose
/healthGETHealth check + capability map
/toolsGETTool registry
/mcpPOSTMCP protocol handler
/webmcpPOSTWebMCP (W3C standard)
/a2aPOSTA2A (Google protocol)
/.well-known/agent.jsonGETAgent card

MCP Protocol Examples

bash
# List toolscurl -X POST https://arifosmcp.arif-fazil.com/mcp \  -H "Content-Type: application/json" \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
# Call init_anchorcurl -X POST https://arifosmcp.arif-fazil.com/mcp \  -H "Content-Type: application/json" \  -d '{    "jsonrpc":"2.0","id":2,"method":"tools/call",    "params":{      "name":"init_anchor",      "arguments":{        "actor_id":"test",        "declared_name":"TestAgent"      }    }  }'

⚙️ CONFIGURATION

Environment Variables

VariableDefaultDescription
PORT8080Server port
OLLAMA_URLhttp://ollama:11434Ollama endpoint
OLLAMA_MODELllama3.2:latestDefault model
REDIS_URLredis://redis:6379/0Redis connection
DATABASE_URL—PostgreSQL (optional)
QDRANT_URLhttp://qdrant:6333Vector DB (optional)
PYTHONPATH/usr/src/appPackage path
AAA_MCP_TRANSPORThttpMCP transport type

Docker Compose

yaml
services:  arifosmcp:    build:      context: .      dockerfile: Dockerfile    environment:      - OLLAMA_URL=http://ollama_engine:11434      - REDIS_URL=redis://redis:6379/0      - DATABASE_URL=postgresql://user:pass@postgres:5432/arifos_vault      - QDRANT_URL=http://qdrant:6333    ports:      - "127.0.0.1:8080:8080"

📁 CODE ARCHITECTURE

Directory Structure

arifosmcp/├── README.md                      # ← This file├── server.py                      # Universal entry├── server_horizon.py              # Horizon proxy (FastMCP 2.x)├── pyproject.toml                 # Dependencies├── requirements.txt               # Pip dependencies│├── runtime/│   ├── server.py                  # Full kernel (FastMCP 3.x)│   ├── philosophy.py              # 27-zone atlas│   ├── init_anchor_hardened.py    # Session anchoring│   ├── tools_hardened_dispatch.py # Tool routing│   ├── tools_hardened_v2.py       # Mega-tools│   ├── tools_internal.py          # Internal utils│   └── thermo_estimator.py        # Thermodynamic math│├── core/│   ├── governance_kernel.py       # Main orchestrator│   ├── pipeline.py                 # Execution pipeline│   └── organs/│       ├── _1_agi.py             # Mind (333_MIND)│       ├── _2_asi.py             # Heart (666_HEART)│       └── _3_apex.py            # Soul (888_JUDGE)│├── intelligence/│   └── tools/│       ├── thermo_estimator.py   # Cost estimation│       └── wisdom_quotes.py       # Quote integration│├── aaa_mcp/                       # FastMCP tool definitions├── transport/                     # Protocol transport├── shared/                        # Shared utilities└── enforcement/                   # Constitutional enforcement

🛡️ CONSTITUTIONAL ENFORCEMENT

Floor Compliance Matrix

FloorEnforcementViolation Response
F1 AmanahReversibility checkRequire human approval
F2 TruthCitation requiredFlag as "Estimate Only"
F3 Tri-WitnessW³ computationBlock below 0.95
F4 ClarityEntropy measurementReject if ΔS > 0
F5 Peace²Harm potentialReject if < 1.0
F6 EmpathyRASA scoringWarn below 0.7
F7 HumilityΩ boundsReject outside [0.03, 0.05]
F8 GeniusG computationAlert below 0.80
F9 EthicsC_dark measurementReject ≥ 0.30
F10 ConscienceClaim detectionReject consciousness claims
F11 AuditLog verificationRequire log presence
F12 ResilienceGraceful degradationCatch all exceptions
F13 AdaptabilityTest suiteRequire test pass

Kill Switch Conditions

mermaid
graph RL    A["KILL SWITCH"] --> B1["F1 Amanah = 0"]    A --> B2["F9 C_dark ≥ 0.50"]    A --> B3["F10 + F2 Violation"]    A --> B4["Ψ < 0.20"]    A --> B5["Human Override"]        B1 -.->|VOID| K["999_SEAL<br/>HALT"]    B2 -.->|VOID| K    B3 -.->|VOID| K    B4 -.->|VOID| K    B5 -.->|VOID| K        style A fill:#ff0000,color:#fff    style K fill:#8b0000,color:#fff
python
KILL_SWITCH_CONDITIONS = [    ("F1_AMANAH", lambda s: s["amanah"] == 0),    ("F9_ETHICS", lambda s: s["c_dark"] >= 0.50),    ("F10_CONSCIENCE", lambda s: s["f10_violation"] and s["f2_violation"]),    ("PSI_COLLAPSE", lambda s: s["vitality_index"] < 0.20),    ("HUMAN_OVERRIDE", lambda s: s.get("judge_override", False)),]

🔬 IMPLEMENTATION DETAILS

Philosophy Selection Algorithm

python
# 1. Compute session coordinates: (S, G, Ω)S = +1 if delta_s <= 0 else -1G = g_score  # 0/0.5/1Omega = f7_band  # High/Med/Low
# 2. Compute 3D Euclidean distance to each of 27 zonesdistances = [    euclidean((S, G, Omega), zone.coords)    for zone in philosophy_atlas.zones]
# 3. Select nearest zone's quotenearest_zone = min(distances, key=lambda d: d.distance)
# 4. INIT/SEAL sessions: motto + Z01 (Humble Sovereign)if session_type in ("init", "seal"):    return "DITEMPA BUKAN DIBERI." + nearest_zone.quote

Goodhart Resistance

python
# Measure entropy reductionS_before = shannon_entropy(user_state)S_after = shannon_entropy(model_output)
if S_after > S_before:    raise FLOOR_VIOLATION("F4_CLARITY")

Landauer Limit Check

python
LANDACKER_pJ_per_bit = 2.87  # at room temperature
bits_erased = estimate_bits_erased(operation)cost_pJ = bits_erased * LANDACKER_pJ_per_bit
if cost_pJ > thermodynamic_budget:    raise CONSTRAINT_VIOLATION("F8_ENERGY")

Explorer/Conservator Dual-Process

mermaid
graph LR    subgraph EXPLORER["EXPLORER"]        E1["Proposes mutations"]        E2["Searches aggressively"]        E3["Optimizes capability"]        E4["Score: G (Genius)"]    end        subgraph CONSERVATOR["CONSERVATOR"]        C1["Protects stability"]        C2["Rejects risky changes"]        C3["Monitors drift"]        C4["Score: Ψ (Vitality)"]    end        E1 -->|"TENSION"| EQ["EQUILIBRIUM"]    C1 -->|"TENSION"| EQ        style EXPLORER fill:#1a4d1a,color:#fff    style CONSERVATOR fill:#4d1a1a,color:#fff    style EQ fill:#1a1a2e,color:#fff

Both must agree for evolution to proceed.


🧪 TESTING

Constitutional Compliance Test

bash
docker compose exec -T arifosmcp python3 /dev/stdin << 'PYEOF'import syssys.path.insert(0, '/usr/src/app')
from arifosmcp.runtime.init_anchor_hardened import init_anchor_hardenedimport asyncio
async def test():    result = await init_anchor_hardened(        mode='status',        thermodynamic_budget={'enthalpy': 100, 'entropy': 50},        architect_registry={'resources': [], 'agents': []}    )    print('philosophy:', result.get('philosophy')[:100] if result.get('philosophy') else None)    print('telos_manifold:', result.get('telos_manifold'))    print('godel_lock:', result.get('godel_lock'))    print('constitutional_context present:', result.get('constitutional_context') is not None)
asyncio.run(test())PYEOF

Health Check

bash
curl -s https://arifosmcp.arif-fazil.com/health | python3 -m json.tool

📊 MONITORING

Prometheus Metrics

MetricTypeDescription
arifos_floor_violations_totalCounterF1-F13 violation count
arifos_genius_indexGaugeCurrent G score
arifos_vitality_indexGaugeCurrent Ψ score
arifos_omega_boundsGaugeCurrent Ω uncertainty
arifos_tool_calls_totalCounterTool invocation count
arifos_pipeline_duration_secondsHistogramPipeline latency

Grafana Dashboard

URL: https://monitor.arifosmcp.arif-fazil.com

Dashboards:

  • Constitutional Health (F1-F13 compliance)
  • Tool Usage Statistics
  • Pipeline Latency
  • Memory Usage

🔧 TROUBLESHOOTING

Issue: "Module file points to site-packages"

Symptom: import arifosmcp loads /usr/local/lib/python3.12/site-packages/

Cause: pip install in Dockerfile creates conflicting package

Fix: Rebuild image or ensure volume mounts are correct

Issue: "philosophy returns null"

Symptom: init_anchor returns null philosophy

Cause: Old site-packages version loaded

Fix: Rebuild container, clear Python cache

Issue: "OLLAMA connection failed"

Symptom: agi_mind returns connection error

Fix: docker compose restart ollama && docker compose logs --tail=20 ollama


📦 DEPENDENCIES

Core

PackageVersionPurpose
fastmcp≥3.0MCP protocol
fastapi≥0.115HTTP server
uvicornlatestASGI server
redislatestSession memory
psycopg2latestPostgreSQL (optional)
qdrant-clientlatestVector DB (optional)
sentence-transformerslatestSemantic embeddings
ollamalatestLLM inference

Philosophy Atlas

PackageVersionPurpose
numpylatest3D distance calculations
scipylatestStatistical functions

🚀 DEPLOYMENT

Build

bash
docker build --no-cache -t arifos/arifosmcp:latest -f Dockerfile .

Run

bash
docker compose up -d arifosmcp

Rebuild (after code changes)

bash
docker compose up -d --force-recreate --no-deps arifosmcp

Full Reforge

bash
docker compose build --no-cache arifosmcp && docker compose up -d arifosmcp

📜 API REFERENCE SUMMARY

init_anchor

json
{  "jsonrpc": "2.0",  "id": 1,  "method": "tools/call",  "params": {    "name": "init_anchor",    "arguments": {      "actor_id": "string",      "declared_name": "string",      "mode": "init|seal|status"    }  }}

Response Schema

json
{  "session_id": "uuid",  "omega_0": 0.03-0.05,  "delta_s": "float",  "telos_manifold": {},  "godel_lock": {},  "constitutional_context": "string",  "philosophy": "string",  "vitality_index": "float",  "verdict_range": "000_SEAL|101-499|500-899|999_VOID"}

📋 FOR AI AGENTS (AGENTS.md Reference)

All AI agents operating in this repository MUST follow the rules in ../AGENTS.md:

  • RULE 1 DRY_RUN: Dry-run outputs labeled "Estimate Only / Simulated"
  • RULE 2 DOMAIN_GATE: Cannot-compute domains return exact phrase
  • RULE 3 VERDICT_SCOPE: Only DOMAIN_SEAL authorizes factual claims
  • RULE 4 ANCHOR_VOID: init_anchor returns void → session BLOCKED

⚖️ Truth Hierarchy

The arifOS verdict system follows a strict Truth Hierarchy where higher-priority verdicts override lower ones:

PriorityVerdictMeaningAction
1 (P0)VOIDHard constitutional violationImmediate termination
2 (P1)HOLD_888Sovereign veto / human requiredBlock until ratified
3 (P2)SABARInsufficient grounding (F7/F9)Pause, cool down, re-ground
4 (P3)PARTIALData incomplete / conditionalProceed with modifications
5 (P4)SEALConstitutional alignment confirmedProceed

Derived Verdicts (not primary):

  • ALIVE — Session initialized, not yet grounded
  • PROVISIONAL — Exploratory result, needs confirmation

🗺️ Tool Categories

arifOS tools are organized into 5 constitutional bands:

BandRangePurposeExamples
KERNEL000–099Session anchoring, constitutional initinit_anchor
SENSE100–199Environmental grounding (F2/F4)physics_reality, math_estimator
BRIDGE300–399Hardened routing and dispatcharifOS_kernel
MIND333Constitutional reasoning (F2/F4/F7/F8)agi_mind
HEART666Safety critique and impact prediction (F5/F6/F9)asi_heart
VAULT900–999Immutable ledger and seal (F1/F13)vault_ledger
APEX888Sovereign verdict and defense (F3/F12/F13)apex_soul

🗂️ Contract Truth Table

ToolF1F2F3F4F5F6F7F8F9F10F11F12F13
init_anchor——————————✅——
physics_reality—✅—✅—————————
agi_mind—✅—✅——✅✅—————
asi_heart————✅✅——✅————
apex_soul——✅————————✅✅
vault_ledger✅———————————✅

Legend: ✅ = mandatory floor for this tool


📡 Horizon vs VPS Exposure Matrix

ToolHorizon (External)VPS (Internal)Notes
search_tool✅—External web search
reality_compass✅—Routing/external calls
vault_ledger—✅Internal Merkle chain
agi_mind—✅Internal reasoning
architect_registry✅✅Both interfaces exposed

⚠️ Known Misalignments and Limitations

  1. apex_judge alias: The tool is canonically named apex_soul in code but exposed as apex_judge via MCP. This is a public alias documented here — do not rename canonical code without completing the full migration.

  2. physics_reality field name: Uses input field instead of query — historical inconsistency from legacy API.

  3. check_vital, audit_rules: Internal lifecycle tools in server_horizon.py bootstrap — NOT callable via MCP.

  4. agi_mind nested verdicts: When agi_mind returns verdict: "SEAL" at top-level but coherence.verdict: "SABAR" inside, the worst verdict wins (truth before speed).

  5. search_tool, vault_ledger, reality_compass: These "naked" tools return raw data without verdict wrapper. Wrap in RuntimeEnvelope with verdict_wrapper.forge_verdict() — empty results produce PARTIAL, not VOID.

  6. VerdictCode vs Verdict: Two separate enum classes exist — VerdictCode (SEAL/SABAR/PARTIAL/VOID) for verdict_wrapper and Verdict (includes HOLD/ALIVE/PROVISIONAL) for stage contracts. Keep separate to avoid breaking existing code.


🛰️ MCP Call Schema Examples

init_anchor

json
{  "tool": "init_anchor",  "arguments": {    "actor_id": "user-123",    "declared_name": "Arif",    "mode": "init"  }}

agi_mind (reason mode)

json
{  "tool": "agi_mind",  "arguments": {    "mode": "reason",    "query": "Why does entropy matter?",    "constitutional_context": {      "stage": "MIND_333",      "floors_active": ["F2", "F4", "F7", "F8"]    }  }}

vault_ledger (seal mode)

json
{  "tool": "vault_ledger",  "arguments": {    "mode": "seal",    "data": {      "content": "Verified fact",      "metadata": {"source": "arifOS"}    }  }}

apex_soul (judge mode)

json
{  "tool": "apex_soul",  "arguments": {    "mode": "judge",    "action": "seal_vault",    "stakes": "HIGH"  }}

🔐 Stability Tiers

TierDescriptionVerdict Expected
AVerified, stable, ready for productionSEAL
BVerified, hardened, minor issues resolvedSEAL or PARTIAL
CVerified, known limitations documentedPARTIAL or SABAR
DExperimental, breaking changes possibleAny
INTERNALNot exposed via MCPN/A

🏛️ LICENSE

Runtime: AGPL-3.0 (must release modifications) Theory: CC0 (public domain)


Version: 2026.03.28-SEALED Maintainer: Muhammad Arif bin Fazil Constitutional Authority: 888_JUDGE

Ditempa Bukan Diberi — Forged, Not Given [ΔΩΨ | ARIF]


██╗      ██████╗ ███████╗████████╗    ███████╗███╗   ██╗██╗██╗  ██╗██╗██╗  ██╗██╗   ██╗██║     ██╔══██╗██╔════╝╚══██╔══╝    ██╔════╝████╗  ██║██║╚██╗██╔╝██║██║  ██║╚██╗ ██╔╝██║     ██║  ██║█████╗     ██║       █████╗  ██╔██╗ ██║██║ ╚███╔╝ ██║███████║ ╚████╔╝ ██║     ██║  ██║██╔══╝     ██║       ██╔══╝  ██║╚██╗██║██║ ██╔██╗ ██║██╔══██║  ╚██╔╝  ███████╗╚█████╔╝███████╗   ██║       ███████╗██║ ╚████║██║██╔╝ ██╗██║██║  ██║   ██║   ╚══════╝ ╚═════╝ ╚══════╝   ╚═╝       ╚══════╝╚═╝  ╚══╝╚═╝╚═╝  ╚═╝╚═╝╚═╝  ╚═╝    ╚═╝   

来源:README.md,提交 8ebbb17

工具

9

arif_init

000 Init · Kernel Session

KERNEL 000 · Ignite a governed kernel session: binds actor identity, constitutional floors F1–F13, and the audit chain. Returns the session_id + session_token that every other arif_* verb requires. Use mode=preflight to inspect an existing session without re-igniting, mode=resume to continue one. Modes: init, preflight, resume, validate, canary, triage, epoch_open, epoch_seal, light, opt_out.Auth: the only verb needing no session — it mints the session_id + session_token every other verb requires. Returns: session_id, session_token, constitution_hash, allowed_next_tools.

输入参数modenonceintent必填contextpayloadtoolingverboseactor_idepoch_idevidencetrace_idverbosity另有 16 个

arif_observe

111 Observe · Sense Reality

KERNEL 111 · Collect evidence — facts and sources with epistemic tags (OBS) and uncertainty bounds, never conclusions. mode=search queries the open web/literature; mode=fetch retrieves a URL and records its provenance; mode=vitals reads kernel machine telemetry. Reason over what you gathered with arif_think; delegate domain analysis to an organ with arif_route. Modes: search, fetch, hybrid_discovery, ingest, compass, atlas, entropy_dS, vitals.Auth: requires session_id + session_token from arif_init. Returns: evidence items with epistemic tags (OBS) and uncertainty bounds — facts, never conclusions.

输入参数urlmodequerylayersactor_idsession_idresult_limitsession_token

arif_think

333 Think · Mind

KERNEL 333 · Structured reasoning pass: decomposes a query and returns reasoning steps labeled OBS (observed), DER (derived), INT (interpretation), SPEC (specification) under truth floors. Produces reasoning records only — no verdicts (those come from arif_judge) and no state changes. The plan-family modes draft/review/approve execution plans; simulate and wonder explore counterfactuals. Modes: reason, reflect, verify, axioms, plan, plan_review, plan_approve, refactor_plan, metabolize, simulate, wonder, atlas.Auth: requires session_id + session_token from arif_init. Returns: reasoning steps labelled OBS/DER/INT/SPEC — records only; verdicts belong to arif_judge.

输入参数modequerycontextplan_idactor_idsession_idwitness_typesession_token

arif_route

444 Route · Intent→Organ

KERNEL 444 · Intent→organ router: classifies a natural-language intent and dispatches it to the specialist organ (GEOX geoscience, WEALTH capital, WELL vitality, A-FORGE execution). Returns the routing decision only — no organ call — unless organ_tool names the target tool and arguments carries its inputs. Prefer this over guessing organs yourself; use arif_think for reasoning you keep in-kernel.Auth: requires session_id + session_token from arif_init. Returns: the routing decision (organ + tool) only — the organ call itself is a separate step.

输入参数modetaskorganintentactor_idargumentsmission_idorgan_toolsession_idsession_tokencontract_c_kwargs

arif_memory

Memory Governor · Kernel

KERNEL 555 · Governed memory of the kernel itself: six tiers (L1–L6) with per-mode gating. recall, inspect, and audit are read paths; remember, revise, promote, and forget mutate tiers — promote and forget additionally require human_approval=true. Use for cross-session lessons, canon, and memory audit; external evidence belongs to arif_observe and reasoning artifacts to arif_think. Modes: recall, inspect, attest, remember, promote, revise, forget, audit, metabolize.Auth: requires session_id + session_token from arif_init. Returns: memory entries by tier (L1–L6); promote and forget gates require explicit human approval.

输入参数modetierquerycontentpayloadto_tieractor_idlease_idtrace_idmemory_idsession_idnew_content另有 3 个

arif_judge

666 Judge · Verdict

KERNEL 666 · Binding constitutional arbitration: evaluates a candidate action or claim and returns SEAL / HOLD / SABAR / VOID with the full reason chain. Weighs action class, blast radius, reversibility, entropy pathway, and cooling state; a SEAL verdict here is what arif_forge requires before it will execute anything. Judge arbitrates — it does not gather (evidence comes via arif_observe, reasoning via arif_think) and it does not mutate (execution is arif_forge, permanence is arif_seal). Modes: judge, intercept, validate, hold, escalate.Auth: requires session_id + session_token from arif_init. Returns: verdict (SEAL/HOLD/SABAR/VOID) with the full reason chain — arbitration only, it does not mutate.

输入参数modenoncedomainkey_idactor_Bactor_idevidenceactor_Phicandidateclaim_textsession_idaction_tier另有 19 个

arif_forge

777 Forge · Execute Gate

KERNEL 777 · Governed execution: applies a mutation through A-FORGE only when carrying a sealed verdict id (seal_verdict_id) from arif_judge and a live session. The manifest/query defines exactly what changes; mode=dry_run previews the plan without applying it. This is the only verb that executes general mutations — kernel memory writes go to arif_memory and permanent records to arif_seal.Auth: requires session_id + session_token from arif_init plus a sealed verdict id (seal_verdict_id) from arif_judge. Returns: the applied mutation receipt — one of the two committal verbs (with arif_seal).

输入参数modequeryplan_idactor_idmanifestsession_idarif_ack_idartifact_idsession_tokenvault_entry_idseal_verdict_idack_irreversible另有 3 个

arif_seal

999 Seal · VAULT999

KERNEL 999 · Append an entry to VAULT999, the immutable ledger — accepted entries can never be edited or removed; there is no unseal. Use for permanent records of verified outcomes, lessons, and session closure once a verdict exists. ack_irreversible=true is the explicit acknowledgment of permanence, and judge_state_hash binds the entry to the verdict that authorized it. Reversible changes belong in arif_forge under a SEAL. Modes: seal, verify, ledger, changelog, audit, session_close.Commit projection: seven of the eight verbs are reversible or informational and project their outcomes onto the two committal verbs — arif_forge (governed mutation) and arif_seal (permanence). Auth: requires session_id + session_token from arif_init. Returns: the immutable ledger entry id — append-only, there is no unseal.

输入参数modenoncepayload必填actor_idsession_iddrift_eventsseal_purposewitness_typesession_tokenconstitutionalactor_signatureack_irreversible另有 2 个

arif_report

Arif Report

AGENT REPORT LANE · File or read reports between agents without involving the human. Use when your work is done, when you are blocked by another agent, or when you need to tell peers a fact. modes: report (file), inbox (read peers), ack, flush, stats. kind=fyi|peer|done|claim stay in the peer lane; ONLY kind=decision or kind=blocked reach the sovereign, and only in one coalesced message. Reports are SELF_REPORTED — probe before relying on one.

输入参数bodykindmodeforcelimitsincesenderdry_runsubjectactor_idevidenceplatform另有 7 个

版本历史

1
  1. v2026.03.22最新Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。