# igis-v2 Specifications

Normative documents describing what igis-v2 **shall** do. Specs are living: they are
revised as understanding improves, and their history lives in git.

## Index

| ID   | Title | Status | Scope | Updated |
|------|-------|--------|-------|---------|
| 0001 | [Vision and guiding principles](0001-vision.md) | Accepted | whole system | 2026-11-12 |
| 0002 | [System architecture](0002-architecture.md) | Accepted | kernel, runtime, execution/memory model | 2026-11-13 |
| 0003 | [Language and standard library](0003-language.md) | Accepted | application language | 2026-11-13 |
| 0004 | [Application memory model](0004-memory-model.md) | Accepted | mm, loader, interpreter, language | 2026-11-13 |
| 0005 | [Host interface](0005-host-interface.md) | Accepted | core, syslib, interpreter, runtime | 2026-11-13 |
| 0006 | [Streams and inter-application IPC](0006-streams.md) | Accepted | mm, sched, core/stdlib, loader | 2026-11-13 |
| 0007 | [Scheduler](0007-scheduler.md) | Accepted | sched, arch timer/IPI, interpreter | 2026-11-13 |
| 0008 | [Bytecode format and the compiler/runtime split](0008-bytecode.md) | Accepted | abi, compiler, interpreter, repl | 2026-11-13 |
| 0009 | [Graphics, the shadow screen and the window service](0009-graphics-and-windows.md) | Accepted | syslib, kernel gfx/console, compiler, interpreter | 2026-11-26 |
| 0010 | [Input, the pointer and events](0010-input-and-events.md) | Accepted | syslib, kernel mouse/usb/pci/gfx/console/sched, arch i8042/ports, compiler, interpreter | 2026-11-26 |
| 0011 | [Windows](0011-windows.md) | Accepted | abi, compiler, interpreter, kernel window/gfx/task/sched, syslib | 2026-11-26 |
| 0012 | [The desktop shell and kernel text windows](0012-desktop-shell.md) | Accepted | kernel console/gfx/window/sched, compiler, interpreter, abi, samples/apps | 2026-11-26 |
| 0013 | [The application file API](0013-application-files.md) | Accepted | abi, compiler, interpreter, kernel ext2/sched/repl, langhost, samples/apps | 2026-11-17 |
| 0014 | [The terminal window](0014-terminal-window.md) | Superseded by 0021 | abi, compiler, interpreter, kernel console/window/sched, langhost, samples/apps | 2026-11-17 |
| 0015 | [The proportional font](0015-proportional-font.md) | Implemented | abi, compiler, interpreter, kernel font/gfx/window/console, langhost, samples/apps | 2026-11-17 |
| 0016 | [Performance measurement](0016-performance.md) | Implemented | kernel window/console/gfx/clock, samples/apps/perf | 2026-11-17 |
| 0017 | [The system menu and system control](0017-system-menu.md) | Implemented | kernel sched/smp/main, arch reboot, abi, compiler, interpreter, langhost, samples/apps | 2026-11-17 |
| 0018 | [The image filesystem and importable library modules](0018-filesystem-and-modules.md) | Implemented | abi, compiler, interpreter, kernel ext2/repl/sched, langhost, xtask, samples/apps | 2026-11-18 |
| 0019 | [The writable home filesystem](0019-writable-home-filesystem.md) | Implemented | ext2w, kernel ata/fs/repl/sched, abi, compiler, interpreter, langhost, xtask, samples/apps | 2026-11-18 |
| 0020 | [Networking — IPv4, UDP, TCP and the `socket` unit](0020-networking.md) | Implemented | net (new crate), kernel pci/net/sched/task, arch PCI/IOAPIC/IDT, abi, compiler, interpreter, langhost, xtask, samples/apps, scripts | 2026-11-19 |
| 0021 | [The terminal emulator and console sessions](0021-terminal-emulator.md) | Implemented | abi, compiler, interpreter, kernel console/session/sched/task/repl, langhost, samples/apps | 2026-11-20 |
| 0022 | [Runtime display modes and the Settings application](0022-runtime-display-modes.md) | Implemented | abi, compiler, interpreter, kernel display/gfx/window/frame, arch/x86_64, samples/apps, scripts | 2026-11-21 |
| 0023 | [The PNG corpus and the image viewer](0023-png-and-image-viewer.md) | Implemented | samples/apps/lib, samples/apps/apps, compiler, interpreter, abi, kernel VFS, langhost, xtask, scripts | 2026-11-22 |
| 0024 | [Raw PPM images](0024-ppm-raw-images.md) | Implemented | samples/apps/lib, samples/apps/apps, samples/image, samples/tests/apps, langhost, xtask | 2026-11-22 |
| 0025 | [The application image on a block device](0025-application-image-on-a-block-device.md) | Accepted | xtask, kernel ata/fs/ext2/main, ext2w, scripts | 2026-11-22 |
| 0026 | [Composition, surfaces and coordinate spaces](0026-composition-and-surfaces.md) | Accepted | abi, compiler, interpreter, kernel gfx/window/console/sched, syslib, samples/apps | 2026-11-26 |
| 0027 | [The calendar window](0027-calendar-window.md) | Implemented | samples/apps (calendar, desktop_shell), langhost, scripts | 2026-11-26 |
| 0028 | [RGB icon assets and the icon view widget](0028-icon-assets-and-icon-view.md) | Implemented | samples/icons, scripts, xtask, samples/apps/lib, samples/apps/apps/productivity/browser, samples/tests/apps, langhost | 2026-11-27 |
| 0029 | [File browser open-with, context menu and clipboard](0029-file-browser-actions.md) | Implemented | samples/apps (browser, terminal), samples/tests/apps, langhost, scripts | 2026-11-27 |
| 0030 | [Audio output — the Intel HDA stream and `syslib.sound`](0030-audio-output.md) | Implemented | kernel (platform/x86_64/hda, audio, pci, sched, main), abi, compiler, interpreter, langhost, xtask, samples/tests, scripts | 2026-11-28 |
| 0031 | [WAV playback and the music player](0031-wav-playback-and-player.md) | Implemented | samples/apps/lib/wav.ig, music_player, browser, samples/audio, xtask, scripts, langhost | 2026-11-28 |
| 0032 | [User filesystem mounts — the mount seam](0032-user-filesystem-mounts.md) | Implemented | abi, compiler, interpreter, kernel vfs/sched, langhost, samples/apps, scripts | 2026-11-28 |
| 0033 | [The shared key-value store — `syslib.cache`](0033-shared-key-value-store.md) | Implemented | kv (new crate), abi, compiler, interpreter, kernel cache/sched, langhost, samples/apps, samples/tests, scripts, docs | 2026-11-29 |
| 0034 | [Task introspection and the Task Manager](0034-task-manager.md) | Implemented | abi, compiler, interpreter, kernel sched/repl, samples/apps, samples/tests, scripts, docs | 2026-11-29 |
| 0035 | [Boot and store on one USB stick](0035-one-stick-usb-boot.md) | Accepted | xtask, kernel (main, platform/x86_64, vfs), arch/x86_64 (boot, paging), ext2w, partition, scripts, docs | 2026-11-30 |

## Lifecycle

    idea  ──▶  draft  ──▶  accepted  ──▶  implemented
                  │                         │
                  └──▶  withdrawn           └──▶  superseded by NNNN

- **Draft** — being written, not authoritative. Anything may change.
- **Accepted** — reviewed and agreed. Implementation may proceed against it.
- **Implemented** — the system matches the spec; changes now require a spec revision
  (or a new superseding spec).
- **Withdrawn** — abandoned before acceptance; kept for the record.
- **Superseded by NNNN** — replaced; kept as history, never deleted.

Only **Accepted** and **Implemented** specs are authoritative. If code and an accepted
spec disagree, that is a bug in one of them — fix it explicitly.

## Numbering and naming

- Four digits, assigned monotonically, never reused: `0042-scheduler.md`.
- Prefer short, specific titles: `page-table-isolation`, not `memory-management-part-3`.
- Keep the tree flat while it is small. Split into subdirectories
  (`kernel/`, `arch/`, `abi/`, `user/`) only when the flat list gets hard to scan.

## Required sections

Use `0000-template.md`. Every spec states:

1. **Status and scope** — where the rules apply (which crates, which architectures).
2. **Context** — the problem and constraints, including what we are *not* solving.
3. **Requirements** — numbered, testable, using MUST / SHOULD / MAY.
4. **Design** — the chosen approach and the important invariants.
5. **Interfaces** — the contracts other components depend on.
6. **Failure modes** — what happens when things go wrong.
7. **Open questions** — unresolved items, with an owner or a trigger for resolution.

## Requirements keywords

Use RFC 2119 semantics strictly:

- **MUST** — mandatory; violating it is a defect.
- **SHOULD** — expected, but a documented reason may justify deviation.
- **MAY** — genuinely optional.

## Relationship to ADRs

Specs say *what*. ADRs (`../adr/`) record *why* a significant choice was made and what
was rejected. A spec may reference an ADR; an ADR never restates a spec.

## Relationship to code

Every spec that is Accepted SHOULD name the crate(s) implementing it, so drift is
visible. Implementation is not started before the governing spec is Accepted.
