---
title: AXM-LAUNCH-001 · Every viewer-bearing project ships a Launch.command
kind: axiom
captured: 2026-05-23
captured_by: orchestrator per Captain directive 2026-05-23
project_code: AXM-LAUNCH-001
parent_framework: AXM-000 (Automaton Axioms · structural axioms of the company)
back_reference: ../_principia/executing-as-architecting.md
parent_brief: ./BRIEF-OMPHALOS-001.md
groundrule: ./AGENT-PRE-FLIGHT.md
sibling_axiom: ./AXM-COMMS-001.md
principle_honored:
  - executing-as-architecting (the Launch IS the deployment, not a separate step)
  - AGENT-PRE-FLIGHT item 3 (this axiom extends the viewer-skin requirement)
sigil: ⊙
---

# AXM-LAUNCH-001 · the rocket leaves the pad

> *Every viewer-bearing project ships a `LAUNCH-<PROJECT>.command` at its root. The command probes a free port, serves the project over HTTP, opens the browser to the index page, and traps cleanup on close. Without this, viewers are unreachable when JS needs server context — `file://` breaks half of what we build.*

## Why this is structural, not a nice-to-have

Half of the canon's interactive surfaces (theme cycles, tab toggles, fetch-based viewers, anything using ES modules or CORS-sensitive APIs) require an HTTP context. Captain repeatedly hit broken-toggle reports because he opened files via `file://` and the JS never reached its data. The fix is structural: every project that has a viewer also has a Launch.command. The Launch.command IS part of the deliverable; without it the deliverable is non-functional from the captain's desktop.

Sibling to AXM-COMMS-001 — the loom is the comm protocol; the Launch.command is the firing pin.

## Three sub-rules

### 1 · Filename

`LAUNCH-<PROJECT-CODE>.command` — for example:
- `LAUNCH-AZRAEL.command` (live, shipped by AZL-000)
- `LAUNCH-HBS-000.command`
- `LAUNCH-APOLLO.command`
- `LAUNCH-OMPHALOS.command`

Stamped per the AXM-COMMS-001 global schema when the project follows it. For project-canonical launch files, `LAUNCH-<CODE>.command` is sufficient (the project code itself locks the identity).

### 2 · Behavior

The Launch.command must:

1. Probe a free port starting from a project-specific base (8770+ used; consult an open port → pick the next free one)
2. `python3 -m http.server <port>` from the project root
3. `open http://localhost:<port>/<index>` in the default browser
4. Trap SIGINT / window-close → kill the http.server subprocess cleanly (no orphan ports)

Reference implementation: `~/Desktop/root/_azrael/LAUNCH-AZRAEL.command`.

### 3 · Reach

The Launch.command lives at the **project root** (not in a subfolder) so double-click from Finder works. It must be:

- Executable (`chmod +x`)
- Self-contained (no external dependencies beyond `python3` and `open`, both stock macOS)
- Idempotent (running it twice doesn't fail; the second run picks a different port or noops)

## Pre-flight integration

AGENT-PRE-FLIGHT item 3 ("Never ship raw MD — pipe through the viewer skin") gets an addendum effective 2026-05-23:

> **3a.** A viewer that cannot be reached via double-click does not satisfy item 3. Every viewer-bearing project includes a `LAUNCH-<PROJECT>.command` at its root. Without it, the viewer is unreachable when JS needs server context, and the deliverable is incomplete.

## Falsification

If a project ships a viewer without a paired Launch.command, this axiom failed. The next correction promotes the rule from `_ops/` axiom to AGENT-PRE-FLIGHT structural placement — making the launch script a required pre-flight check before any viewer artifact can be shipped.

## Lineage

- Sprouted from Captain's directive 2026-05-23 — *"How is that not an axiom or Operandi Principum?"* — after the AZL-000 ship demonstrated the pattern without anything in the rules requiring it.
- Sibling to AXM-COMMS-001 under AXM-000.
- Walking-distance to `_azrael/LAUNCH-AZRAEL.command` (the reference implementation).

## Pre-flight affirmation

```yaml
pre_flight:
  read_principia: yes
  found_grammar: yes          # Launch.command pattern already minted by AZL-000
  viewer_skin: not yet wrapped — small canonical axiom, will follow AXM-COMMS-001's pattern
  stamped: yes
  gaps_disclosed: yes         # paired viewer for this axiom doc deferred; AXM-LAUNCH-001 itself is the doc
  ptah_write: n/a             # new file
```
