Compare commits

5 Commits

Author SHA1 Message Date
e8fa7e1f28 Update devcontainer (AI+human) 2026-02-23 08:13:18 +01:00
1cf39a70cf Update instructions (human) 2026-02-23 08:12:51 +01:00
bbd7d3725b Add devcontainer for i386 kernel development (AI)
Provides a reproducible Debian-based build environment with:
- Clang + LLD for cross-compilation to i386-elf targets
- GRUB 2 tools (grub-pc-bin, xorriso, mtools) for bootable
  ISO and floppy image generation
- QEMU (i386) for integration test execution
- CMake + Ninja for the build system

The Dockerfile includes a self-test that verifies Clang + lld can
produce a valid ELF 32-bit i386 binary before the image is accepted.
2026-02-23 07:13:49 +01:00
f3ef92be4f Create directory structure (AI)
Set up the project directory structure as specified in the README:
- apps/: for application source code (e.g. ls, sh)
- docs/: for subsystem documentation
- libs/: for shared libraries used by apps and/or the kernel
- src/: for kernel source code
- src/it/: for integration tests
- vendor/: for 3rd-party source code (AI will not modify this)

The build/ directory is excluded via .gitignore as it contains only
build artifacts. ISO and floppy image files are also gitignored.
2026-02-23 07:09:04 +01:00
34e24c9979 Add PROMPT.md with original AI prompt (AI)
Document the prompt given to the AI to implement ClaudeOS, making the
request auditable as described in the README task list requirements.
2026-02-23 07:08:34 +01:00
12 changed files with 81 additions and 4 deletions

41
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,41 @@
# ClaudeOS build environment
#
# Provides everything needed to build and test a bare-metal i386 kernel:
# - Clang + LLD for cross-compilation to i386-elf
# - GRUB 2 tools for generating bootable ISO and floppy images
# - QEMU (i386) for running integration tests
# - CMake + Ninja for the build system
# - xorriso and mtools used internally by grub-mkrescue / grub-mkimage
FROM alpine:3.23
RUN apk add --no-cache \
# Core build tools
clang \
lld \
cmake \
ninja \
make \
git \
# GRUB image generation
grub \
xorriso \
mtools \
# QEMU for running the OS
qemu-system-i386 \
# Handy utilities
file \
ca-certificates
# Verify the cross-compilation toolchain can produce an i386-elf binary.
# Compile and link separately so ld.lld is invoked directly, avoiding the
# host gcc linker driver (which rejects -m32 on non-x86 hosts such as aarch64).
RUN echo 'void _start(void){for(;;)__asm__("hlt");}' > /tmp/test.c \
&& clang -v -target i386-elf -march=i386 -ffreestanding -fno-stack-protector \
-c /tmp/test.c -o /tmp/test.o \
&& ld.lld -m elf_i386 -e _start --nostdlib /tmp/test.o -o /tmp/test.elf \
&& file /tmp/test.elf | grep -q "ELF 32-bit.*386" \
&& echo "Toolchain OK" \
&& rm /tmp/test.c /tmp/test.o /tmp/test.elf
WORKDIR /workspaces/claude-os

View File

@@ -0,0 +1,24 @@
{
"name": "ClaudeOS Dev",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cmake-tools",
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack"
],
"settings": {
"cmake.generator": "Ninja",
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "${workspaceFolder}/cmake/toolchain-i386-clang.cmake"
}
}
}
},
"postCreateCommand": "echo 'ClaudeOS devcontainer ready!'",
"remoteUser": "root"
}

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
build/
*.iso
*.img

View File

@@ -3,12 +3,14 @@ This document describes which files are written fully by humans, which had human
## Fully Human ## Fully Human
The following files were written completely by humans: The following files were written completely by humans:
- HUMAN.md - `HUMAN.md`
- README.md - `README.md`
- Everything in `vendor/`. While we don't actually know if it was written by humans, certainly the AI used for this project has not touched it. - Everything in `vendor/`. While we don't actually know if it was written by humans, certainly the AI used for this project has not touched it.
## Partially Human ## Partially Human
The following files were written partially by humans: The following files were written partially by humans or was generated by an AI and was later edited:
- `.devcontainer/Dockerfile`
## Fully AI ## Fully AI
Any file not in the above two categories were completely written by an AI without a human manually editing the file afterwards. Any file not in the above two categories were completely written by an AI without a human manually editing the file afterwards.

7
PROMPT.md Normal file
View File

@@ -0,0 +1,7 @@
# Prompt
The following prompt was given to GitHub Copilot (Claude Sonnet 4.6) on 23 February 2026:
> Please implement the task list in this readme
The task list referred to is the one found in README.md, which describes how to build ClaudeOS — an AI-built operating system written in C, targeting 80386 hardware, providing a UNIX-like shell environment.

View File

@@ -32,7 +32,7 @@ The source code uses the following directory structure:
# Task list # Task list
An AI implementing this operating system should implement features in this order. An AI implementing this operating system should implement features in this order.
After each feature, it should create a new Git commit. After each feature, it should create a new Git commit and push the commit.
The git commit should describe what is done and why certain choices were made. The git commit should describe what is done and why certain choices were made.
The title of the commit should always end with (AI), to indicate that it was written by an AI. The title of the commit should always end with (AI), to indicate that it was written by an AI.

0
apps/.gitkeep Normal file
View File

0
docs/.gitkeep Normal file
View File

0
libs/.gitkeep Normal file
View File

0
src/.gitkeep Normal file
View File

0
src/it/.gitkeep Normal file
View File

0
vendor/.gitkeep vendored Normal file
View File