Skip to content

offbyone1/PromptOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

🌌 PromptOS

An entire x86_64 Operating System – generated 100% by Artificial Intelligence.

100% AI Generated Language: C Architecture: x86_64 Status: Experimental License: Unlicense Build


TL;DR: This entire operating system (over 115,000 lines of C code) was built entirely through iterative AI prompting over the course of about 6 weeks (spending roughly 1 hour per day). I, the author, had only basic programming experience, but zero experience in OS development or complex systems programming.


⚠️ Important Disclaimer: I am NOT a Systems Programmer!

Before you dive into the code, I want to be 100% transparent: I am not claiming this code is secure, well-architected, or even "good".

While I understand the fundamentals of C, I am by no means an experienced developer or OS engineer. I cannot accurately judge the architectural quality or security of the code the AI produced. There are likely severe security vulnerabilities, memory leaks, race conditions, and architectural nightmares hidden in here. This project is meant to be an experiment on the limits of Large Language Models, not a production-ready system. If you are an experienced systems programmer, you will probably find things that make you want to pull your hair outβ€”and that's exactly what makes this project so interesting!

πŸ“– The Story Behind PromptOS

PromptOS is an experiment exploring what current LLMs can do. The guiding question was: Is an AI capable of building the most complex software architecture in computer science from scratch, without a human developer writing a single line of code manually?

The result is PromptOS: a runnable x86_64 OS with its own custom kernel, virtual file system, complete networking stack, and a graphical user interface (GUI) with a window manager. Everything was orchestrated through a massive Plan.md, using an AI Code Auditor to verify implementation, and building custom web-based tooling to allow the AI to debug and iterate autonomously.

πŸš€ Features (What the AI Delivered)

Despite being built entirely by AI, PromptOS includes the following features:

  • 🧠 Custom x86_64 Kernel: Multitasking scheduler, SMP (Symmetric Multiprocessing), Physical/Virtual Memory Management (PMM/VMM).
  • πŸ“ BetterFS & VFS: A completely custom file system designed by AI (BetterFS), along with support for FAT32, DevFS, ProcFS, and RamFS.
  • 🌐 Networking Stack: Custom TCP/IP stack, UDP, DHCP, DNS, and basic routing.
  • πŸ–₯️ Desktop Environment: A window compositor, taskbar, and a custom widget library (Buttons, TextBoxes, TreeViews).
  • πŸ”’ Security & Crypto: Custom crypto stack (AES, SHA256, Ed25519, TLS 1.3 basics) and code-signing mechanisms.
  • πŸ› οΈ Userland & Apps: A C standard library (libc), shell, package manager (npkg), editor, paint, calculator, and file manager.

πŸ“Έ Screenshots

PromptOS booting in the Web Debugger

PromptOS reaching Phase 10 (Desktop Environment) in the Web Debugger

PromptOS initialization phases

Kernel initialization phases shown in the Web Debugger console

🧩 The Architecture (The Good, The Bad & The AI)

Because this project grew without deep human C expertise, the AI made some interesting (and sometimes questionable) architectural decisions to solve problems:

  • Autonomous Debugging & Tooling: Instead of manually feeding error logs, we built a custom website and specialized tooling that allowed the AI to read QEMU logs, trace page faults, and debug memory leaks completely on its own until it successfully patched the pointer errors.
  • Extensive Test Strategy: To ensure its own code worked, we developed a highly professional Testing Strategy and the AI generated dozens of unit tests running directly on the host (tests/host/unit/) as well as in-kernel tests and fuzzers (tests/fuzzer/, tests/bench/). We actually run a suite of host tests instantly without QEMU to guarantee libc and logic stability!

πŸ’» Building & Running PromptOS

The system is configured to run in modern emulators and hypervisors.

Prerequisites

  • GCC Cross-Compiler for x86_64-elf (or WSL)
  • make
  • QEMU or Hyper-V

Build & Run

The repository includes handy scripts to get you started immediately:

# Build the complete system (Kernel, Bootloader, Userland, Apps)
make all

# Create a bootable ISO / Disk Image
./scripts/make-iso.sh
# or
./scripts/make-image.sh

# Start PromptOS in the emulator
./scripts/run-qemu.sh

(Windows/Hyper-V users can use the provided .ps1 scripts in the scripts/ directory).

πŸ“š Documentation

Document Description
INSTALL.md Development environment setup (cross-compiler, QEMU, etc.)
docs/dev-guide.md Developer guide: architecture, build, extending PromptOS
docs/SYSCALL.md Syscall ABI v1 specification (100 syscalls)
docs/BOOT_PROTOCOL.md Custom UEFI boot protocol specification
docs/STYLE.md Coding style guide
docs/TESTING_STRATEGY.md Testing strategy and test infrastructure
docs/GUI_PROTOCOL.md GUI display protocol
docs/IPC_PROTOCOL.md IPC mechanisms
CHANGELOG.md Version history

🀝 Get Involved / Feedback

If you are an OSDev enthusiast, AI researcher, or C hacker and want to check out the code: Welcome! Feel free to explore the architectural anomalies, open issues, or discuss the capabilities of modern LLMs in the context of systems programming.


Built with πŸ€– (primarily Claude Opus 4.5, via Cursor) & β˜•

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors