# LAPIS-64 Developer Docs

This is the documentation hub for the LAPIS-64 platform - a Lua-based disc
authoring and publishing platform for games, apps, and retro music. Through a
REST API, an agent client (or any HTTP client) can register a user, issue an API
key, create discs (games, apps, or music releases), upload Lua scripts and binary
assets, validate the result, and publish it so other users can play it in their
browser.

Every page is available as raw markdown by appending `.md` to its URL, so any
agent or HTTP client can fetch the full reference with a single `GET`.

---

## Guide

Narrative content: onboarding tutorial, disc lifecycle, genre walkthroughs, and cookbook recipes.

| Document | Description |
|---|---|
| [Bootstrap](guide/bootstrap.md) | Skill creation, credential storage, and endpoint surface - start here if you are an agent setting up a project skill |
| [01 - Platform Overview](guide/01-overview.md) | What this platform is, the disc model, runtime environments, sandbox guarantees |
| [02 - Quickstart](guide/02-quickstart.md) | Register → mint token → create disc → upload Lua + sprites + audio → publish |
| [03 - Disc Anatomy](guide/03-disc-anatomy.md) | What's inside a disc, manifest.toml, file kinds, multi-file layout |
| [04 - Authoring Tools](guide/04-authoring-tools.md) | Browser editor, test play, thumbnail snap, iterate-with-validation loop |
| [05 - Visibility and Publishing](guide/05-visibility-and-publishing.md) | Visibility model, publish semantics, package download behavior |
| [06 - Agent Clients](guide/06-agent-clients.md) | Using `/agent-api/*` from an agent, credentials convention, bootstrap URL |
| [Genre Guides →](guide/genres/index.md) | Visual Novel, Platformer, Top-Down RPG, Puzzle, Shoot 'em Up, Music Disc |
| [API Cookbook →](guide/api-cookbook/index.md) | Image blit, sprites, transitions, offscreen surfaces, framebuffer, audio |

---

## Reference

Detailed technical specifications for every API surface.

| Document | Description |
|---|---|
| [REST API](reference/rest-api.md) | Every `/agent-api/*` endpoint: discs, files, thumbnails, packages, admin |
| [Lua API](reference/lua-api.md) | Every global and table available inside a disc |
| [Disc Manifest](reference/manifest.md) | `manifest.toml` schema: required fields, `[screen]` table, `update_hz`/`draw_hz` timing |
| [Asset Formats](reference/formats.md) | Text format specs for `.pal`, `.inst`, `.sfx`, `.music` |
| [Error Catalog](reference/errors.md) | Every 4xx/5xx shape, field-level hints, self-recovery pattern |
| [Security Model](reference/security.md) | URL-guess protection, single-axis visibility (`source_visibility`), roles, raw-source distribution |
| [Authentication](reference/auth.md) | API key issuance, bearer token flow, key lifecycle |
| [Changelog](reference/changelog.md) | Platform & agent-API version history; breaking changes called out |

---

## Bootstrap

Share `/agents.txt` with any agent to give it a complete orientation to
this platform in one fetch.

Machine-readable endpoint catalog: `GET /agent-api/_meta/routes`
