{
  "env": {
    "config_prefix": "APP_CONFIG_",
    "data_dir": "APP_DATA_DIR",
    "host": "HOST",
    "parent_pid": "APP_PARENT_PID",
    "port": "PORT",
    "token": "APP_TOKEN"
  },
  "rules": [
    {
      "applies_to": "backend.process",
      "id": "B1",
      "statement": "Bind 127.0.0.1 on PORT, no other address."
    },
    {
      "applies_to": "backend.process",
      "id": "B2",
      "statement": "Answer backend.health with 2xx once ready."
    },
    {
      "applies_to": "backend.process",
      "id": "B3",
      "statement": "Never open a browser."
    },
    {
      "applies_to": "backend.process",
      "id": "B4",
      "statement": "Write own state only under APP_DATA_DIR; user files only inside granted config folders."
    },
    {
      "applies_to": "backend.process",
      "id": "B5",
      "statement": "Exit within stop_timeout after stdin closes or SIGTERM."
    },
    {
      "applies_to": "backend.process",
      "id": "B6",
      "statement": "Log to stdout and stderr; never block on full pipes."
    },
    {
      "applies_to": "backend.process",
      "id": "B7",
      "statement": "Reject non-asset requests without the token (required for release checks)."
    },
    {
      "applies_to": "ui.static",
      "id": "F1",
      "statement": "index.html at the root of frontend.dist."
    },
    {
      "applies_to": "ui.static",
      "id": "F2",
      "statement": "Relative URLs for assets and API calls."
    },
    {
      "applies_to": "ui.static",
      "id": "F3",
      "statement": "Nothing essential loaded from the network."
    },
    {
      "applies_to": "ui.static",
      "id": "F4",
      "statement": "No hard-coded host or port."
    },
    {
      "applies_to": "ui.static",
      "id": "F5",
      "statement": "Strict-CSP compatible: no inline handlers, no eval."
    }
  ],
  "token_cookie": "app_token",
  "token_param": "app_token"
}
