Rules
Generated from the rule catalogue; do not edit. Run app-anything docs to refresh.
| Id | Title | Severity | Phase | Contract | Applies |
|---|---|---|---|---|---|
| AA001 | Manifest round-trips through the schema | error | static | A manifest value that does not survive an encode/decode round trip will be lost when the package is built. Fix: Use plain values the schema describes; check app-anything explain for the field reference. |
|
| AA002 | Format version is supported | error | static | A manifest written for an unknown format version cannot be interpreted safely. Fix: Set format to 0.1 or run app-anything upgrade. |
|
| AA003 | Every required capability exists in the declared set | error | static | Unknown capabilities cannot be assessed by any creator, so the app would fail late with a confusing error. Fix: Remove the capability, or declare a vendor capability as x-<vendor>.<name>. | |
| AA004 | Capabilities match declarations | error | static | The requires list is the input to target assessment; leaving implied capabilities out would let creators build broken apps. Fix: Add backend.process when a backend is declared, fs.app-data when config values exist, fs.user-folder for read-write folders. | |
| AA010 | App id is not a placeholder | warning | static | Placeholder ids collide between apps and are rejected by operating system registration. Fix: Pick a reverse-dns id you control, like com.yourname.notes. | |
| AA101 | Frontend has index.html at its root | error | static | Hosts and creators open the app by loading index.html from the dist folder (contract F1). Fix: Build the frontend first, or point frontend.dist at the folder that contains index.html. | |
| AA104 | Frontend serving mode matches the backend | error | static | A static frontend next to a process backend has no way to reach it with relative URLs; the backend must serve the frontend at /. Fix: Serve the built frontend from your backend at / (set frontend.served_by to backend). | |
| AA110 | Frontend uses relative URLs for assets | error | static | F2 | Root-absolute URLs break under file:// and when the app is hosted below the origin root (contract F2). Fix: Remove the leading slash: '/vendor/x.js' becomes 'vendor/x.js'. |
| AA111 | No hard-coded host or port | error | static | F4 | The host picks the port; a hard-coded address works only by accident on the author's machine (contract F4). Fix: Read the port from the PORT environment variable and use relative URLs. |
| AA112 | Nothing essential from the network | error | static | F3 | Installed apps must work offline; a script from a CDN fails the first time the machine is not online (contract F3). Fix: Vendor the file into the frontend dist and reference it relatively. |
| AA113 | Strict-CSP compatible | error | static | F5 | Desktop shells apply a strict content security policy; inline handlers and eval are rejected (contract F5). Fix: Move handlers into script files; replace eval with JSON.parse or explicit logic. |
| AA114 | No references to files missing from dist | error | static | F1 | A reference that does not resolve is a broken app on every target (contract F1). Fix: Run the frontend build before checking, or fix the reference. |
| AA201 | Backend starts and answers the health path | error | dynamic | B2 | An app whose backend cannot start under the contract is broken on every target (contract B2). Fix: Bind 127.0.0.1 on PORT, start within start_timeout, and return 2xx on the health path. |
| AA202 | Backend listens on the port from PORT | error | dynamic | B1 | The host assigns the port; ignoring it collides with other apps and breaks restarts (contract B1). Fix: Read PORT from the environment and bind it; never use a fixed port number. |
| AA203 | Backend is unreachable on non-loopback interfaces | error | dynamic | B1 | A loopback backend reachable from the network leaks the app to other machines (contract B1). Fix: Bind 127.0.0.1 explicitly, not 0.0.0.0. |
| AA204 | Backend never opens a browser | error | dynamic | B3 | In an installed app there is no browser to open; the attempt hangs or fails (contract B3). Fix: Remove webbrowser.open and similar calls; the host opens the window itself. |
| AA205 | Backend exits after stdin closes or SIGTERM | error | dynamic | B5 | A backend that ignores shutdown keeps ports busy and appears as a hung app (contract B5). Fix: Exit when stdin reaches EOF and handle SIGTERM; do not swallow them. |
| AA206 | No process survives the backend's exit | error | dynamic | B5 | Orphaned children keep ports and files busy after the app is gone (contract B5). Fix: Make children die with the parent: process groups, or a parent-watch in the entry point. |
| AA207 | Backend logs to stdout without blocking | error | dynamic | B6 | A backend that blocks on a full stdout pipe freezes the whole app (contract B6). Fix: Log to stdout and stderr only; never wait on a full pipe. |
| AA301 | No writes inside the project tree during a run | error | dynamic | B4 | The installed app folder is read-only; writes into it fail on every target (contract B4). Fix: Write under APP_DATA_DIR; treat the project tree as immutable. |
| AA302 | No writes outside APP_DATA_DIR | error | dynamic | B4 | Writing into the user's home directory from nowhere breaks data hygiene and sandboxing (contract B4). Fix: Write only under APP_DATA_DIR and folders the user granted through config. |
| AA401 | API rejects requests without the token | warning | dynamic | B7 | Any local process can reach a loopback backend; the token handshake keeps other apps out (contract B7). Fix: Read APP_TOKEN, expect it as a query parameter on the first request, answer with an HttpOnly SameSite=Strict cookie, then require the cookie or a Bearer header. |
| AA402 | No wildcard Access-Control-Allow-Origin | error | dynamic | A wildcard CORS header on a loopback backend lets any local web page talk to the app. Fix: Do not set Access-Control-Allow-Origin: * on loopback responses. | |
| AA501 | Icon is a square PNG of at least 1024 pixels | warning | static | Stores and shells want a 1024 px master; smaller icons come out blurry on high-dpi screens. Fix: Put a square 1024x1024 PNG at app-anything/icon.png. | |
| AA502 | Icon has transparency and content inside the central 80 percent | info | static | OS masks crop icons to rounded shapes; content in the outer band is cut off. Fix: Keep the artwork inside the central 80 percent and keep the corners transparent. | |
| AA601 | A creator can build the requested target with every required capability | error | static | Like an ONNX runtime without an operator: mismatches must be reported before any build work happens. Fix: Drop the unsupported capability, or install a creator that offers it for this target. | |
| AA602 | Partial capability support is reported | info | static | A creator that supports a capability only partially builds a degraded app; the author must know before building. Fix: Read the notes and decide whether the degradation is acceptable for this target. |
Rendered from spec/generated/rules.md on main.