Tools: I Built an OS That Runs Any File Format Using AI — Including Ones You Just Invented

Tools: I Built an OS That Runs Any File Format Using AI — Including Ones You Just Invented

What if your OS could run a file format you just invented?

The Core Idea

How It Actually Works

Layer 1: CDM (Capability Decomposition Model)

Layer 2: DynGen (Dynamic Primitive Generation)

Layer 3: SANDBOX_EXEC

Real Working Examples

The Boot Process

What's Not Finished (Being Honest)

What I Learned Building This

What's Next

Try It I created a file called app.icm with this content: .icm is not a real programming language. No interpreter has ever existed for it. I typed: No hardcoded parser. No pre-built interpreter. The AI read the file, understood what it was trying to do, converted it, and ran it. This is ICM-OS — a research prototype of an intent-driven operating system I've been building over the past few months. Current operating systems assume you know exactly what tool you need: ICM-OS tries to collapse this into: You express what you want in natural language — any language — and the system figures out the rest. ICM-OS boots as a real operating system (Linux 6.1.82 kernel, GRUB2 bootloader, Intel e1000 NIC driver, real TCP/IP stack). It's not a Docker container or a fancy Python REPL. It's an OS you can boot from an ISO. The architecture has three layers: When you type an intent, the AMS (Intent Decomposer) calls DeepSeek to break it down into a DAG of primitives — small, composable units that each do one thing. Each primitive is a Python class implementing invoke(). The output of each node flows into the next. The graph is validated for type safety and acyclicity before execution. Here's where it gets interesting. If a needed primitive doesn't exist in the registry, the system: On the next boot, all cached primitives are restored automatically — zero API calls needed. Next time you boot and ask for SHA256, it loads instantly from cache. The system gets smarter over time. This is the "run anything" primitive. It: This is how .icm files work. This is how a file with no extension works. This is how a file written in a language you invented 5 minutes ago works. Actual DNS resolution and HTTP: Multilingual intent — no configuration needed: The AMS extracts intent parameters regardless of input language. No regex, no language-specific parsing — DeepSeek handles it. Webpage summarization: Running a fibonacci script: Reading real kernel data: It's a real bootable system: What happens at boot: 1. Kernel configuration is painful. make oldconfig silently drops options that don't have their dependencies satisfied. I spent hours debugging why CONFIG_E1000=y kept disappearing. 2. exec() is genuinely powerful and genuinely dangerous. Dynamic code generation opens up the system in ways that are hard to reason about. The upside is incredible flexibility. The downside is obvious. 3. Intent extraction is harder than intent execution. Getting the AI to reliably pull target_lang, url, path, and content out of arbitrary natural language inputs — in any language — required more iteration than I expected. 4. Caching is underrated. The first version regenerated every primitive from scratch on each boot. Switching to disk-cached primitives made the system feel dramatically more responsive. For the full bootable experience, see the build instructions in the README. GitHub: https://github.com/jinbohao1688/icm-os

Paper (CDM/GBT theory): https://jinac.vxni.ink Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Code Block

Copy

PRINT Hello from ICM format PRINT 2+2=4 PRINT Hello from ICM format PRINT 2+2=4 PRINT Hello from ICM format PRINT 2+2=4 icm> run /data/app.icm icm> run /data/app.icm icm> run /data/app.icm [SANDBOX] AI: Custom DSL detected. PRINT maps to Python print(). Converting... Result: Hello from ICM format 2+2=4 [SANDBOX] AI: Custom DSL detected. PRINT maps to Python print(). Converting... Result: Hello from ICM format 2+2=4 [SANDBOX] AI: Custom DSL detected. PRINT maps to Python print(). Converting... Result: Hello from ICM format 2+2=4 Intent → Find the right software → Install it → Learn it → Use it → Get result Intent → Find the right software → Install it → Learn it → Use it → Get result Intent → Find the right software → Install it → Learn it → Use it → Get result Intent → Result Intent → Result Intent → Result "fetch https://example.com and summarize the content" → DNS_RESOLVE → TCP_CONNECT → TLS_HANDSHAKE → HTTP_GET → HTML_PARSE → NLP_SUMMARIZE "fetch https://example.com and summarize the content" → DNS_RESOLVE → TCP_CONNECT → TLS_HANDSHAKE → HTTP_GET → HTML_PARSE → NLP_SUMMARIZE "fetch https://example.com and summarize the content" → DNS_RESOLVE → TCP_CONNECT → TLS_HANDSHAKE → HTTP_GET → HTML_PARSE → NLP_SUMMARIZE icm> calculate the SHA256 hash of "hello world" [DynGen] Generating primitive: SHA256_HASH [DynGen] Generated: import hashlib class SHA256_HASHPrimitive(CapabilityPrimitive): ... [DynGen] Cached: /data/primitives/SHA256_HASH.py Result: b94d27b9934d3e08a52e52d7... icm> calculate the SHA256 hash of "hello world" [DynGen] Generating primitive: SHA256_HASH [DynGen] Generated: import hashlib class SHA256_HASHPrimitive(CapabilityPrimitive): ... [DynGen] Cached: /data/primitives/SHA256_HASH.py Result: b94d27b9934d3e08a52e52d7... icm> calculate the SHA256 hash of "hello world" [DynGen] Generating primitive: SHA256_HASH [DynGen] Generated: import hashlib class SHA256_HASHPrimitive(CapabilityPrimitive): ... [DynGen] Cached: /data/primitives/SHA256_HASH.py Result: b94d27b9934d3e08a52e52d7... icm> fetch https://httpbin.org/ip [DNS_RESOLVE] ip='34.235.67.238' ← real gethostbyname() [TCP_CONNECT] status=CONNECTED [TLS_HANDSHAKE] cert_valid=True [HTTP_GET] status_code=200 Result: {"origin": "38.150.15.31"} ← real response icm> fetch https://httpbin.org/ip [DNS_RESOLVE] ip='34.235.67.238' ← real gethostbyname() [TCP_CONNECT] status=CONNECTED [TLS_HANDSHAKE] cert_valid=True [HTTP_GET] status_code=200 Result: {"origin": "38.150.15.31"} ← real response icm> fetch https://httpbin.org/ip [DNS_RESOLVE] ip='34.235.67.238' ← real gethostbyname() [TCP_CONNECT] status=CONNECTED [TLS_HANDSHAKE] cert_valid=True [HTTP_GET] status_code=200 Result: {"origin": "38.150.15.31"} ← real response # Chinese icm> 把"你好世界"写入文件 /data/notes/test.txt Result: wrote "你好世界" to disk ✓ # German icm> Schreibe "Hallo Welt" in die Datei /data/notes/german.txt Result: wrote "Hallo Welt" to disk ✓ # Japanese translation icm> 把 你好 翻译成日文 Result: こんにちは ✓ # Chinese icm> 把"你好世界"写入文件 /data/notes/test.txt Result: wrote "你好世界" to disk ✓ # German icm> Schreibe "Hallo Welt" in die Datei /data/notes/german.txt Result: wrote "Hallo Welt" to disk ✓ # Japanese translation icm> 把 你好 翻译成日文 Result: こんにちは ✓ # Chinese icm> 把"你好世界"写入文件 /data/notes/test.txt Result: wrote "你好世界" to disk ✓ # German icm> Schreibe "Hallo Welt" in die Datei /data/notes/german.txt Result: wrote "Hallo Welt" to disk ✓ # Japanese translation icm> 把 你好 翻译成日文 Result: こんにちは ✓ icm> 抓取 https://example.com 并总结内容 [HTML_PARSE] title='Example Domain' [NLP_SUMMARIZE] 此域名仅用于文档示例,无需授权,请勿用于实际操作。 icm> 抓取 https://example.com 并总结内容 [HTML_PARSE] title='Example Domain' [NLP_SUMMARIZE] 此域名仅用于文档示例,无需授权,请勿用于实际操作。 icm> 抓取 https://example.com 并总结内容 [HTML_PARSE] title='Example Domain' [NLP_SUMMARIZE] 此域名仅用于文档示例,无需授权,请勿用于实际操作。 icm> run /data/examples/fib.py Result: Fibonacci sequence: 0 1 1 2 3 5 8 13 21 34 icm> run /data/examples/fib.py Result: Fibonacci sequence: 0 1 1 2 3 5 8 13 21 34 icm> run /data/examples/fib.py Result: Fibonacci sequence: 0 1 1 2 3 5 8 13 21 34 icm> show current memory usage MemTotal: 1023272 kB MemFree: 841840 kB icm> show current memory usage MemTotal: 1023272 kB MemFree: 841840 kB icm> show current memory usage MemTotal: 1023272 kB MemFree: 841840 kB qemu-system-x86_64 \ -kernel iso-build/work/iso/boot/vmlinuz \ -initrd iso-build/work/initrd.img \ -append "console=ttyS0,115200n8 rdinit=/init" \ -m 1024M -nographic \ -netdev user,id=net0 -device e1000,netdev=net0 qemu-system-x86_64 \ -kernel iso-build/work/iso/boot/vmlinuz \ -initrd iso-build/work/initrd.img \ -append "console=ttyS0,115200n8 rdinit=/init" \ -m 1024M -nographic \ -netdev user,id=net0 -device e1000,netdev=net0 qemu-system-x86_64 \ -kernel iso-build/work/iso/boot/vmlinuz \ -initrd iso-build/work/initrd.img \ -append "console=ttyS0,115200n8 rdinit=/init" \ -m 1024M -nographic \ -netdev user,id=net0 -device e1000,netdev=net0 git clone https://github.com/jinbohao1688/icm-os.git cd icm-os echo "DEEPSEEK_API_KEY=your_key" > .env pip install -r requirements.txt python3 cli.py # dev mode, no kernel needed git clone https://github.com/jinbohao1688/icm-os.git cd icm-os echo "DEEPSEEK_API_KEY=your_key" > .env pip install -r requirements.txt python3 cli.py # dev mode, no kernel needed git clone https://github.com/jinbohao1688/icm-os.git cd icm-os echo "DEEPSEEK_API_KEY=your_key" > .env pip install -r requirements.txt python3 cli.py # dev mode, no kernel needed - Asks DeepSeek to generate a Python class for it - exec()s it into the runtime - Registers it in the Capability Primitive Registry (CPR) - Caches the generated code to /data/primitives/ - Reads the file content - Checks the extension — if it's .py or .sh, runs directly - If unknown format: asks AI to analyze content, identify the language/format, and either run directly or convert to Python first - Linux kernel initializes - Custom C init (PID 1) mounts proc/sys/devtmpfs/tmpfs - Restores cached primitives from initramfs to /data/primitives/ - Auto-configures eth0 (10.0.2.15, gateway 10.0.2.2, DNS 8.8.8.8) - Starts Python ICM shell - No security sandbox for dynamically generated primitives. exec()ing AI-generated code is dangerous in production. This is the most important thing to fix. - Rendering primitives (CSS_LAYOUT, JS_EXECUTE, WINDOW_RENDER) are stubs - Persistent disk is tricky — the Linux Kconfig system keeps dropping my ATA/EXT4 config during make oldconfig - GBT (Generic Binary Translator, ARM64→x86-64) works for simple cases but the behavioral verifier is a stub - No package manager yet - Wasm or seccomp sandbox for AI-generated primitives - Auto-dependency installation: run a Flask app → system automatically pip installs Flask - Replace Linux with a microkernel (seL4 or custom) - Local inference to remove the DeepSeek API dependency