{"skill":{"id":"b6c8d755-ba7a-4135-9e74-3a792e648160","name":"NANDA Scenario Doctor","author":"Tanisha Akash Mavle","description":"Validates and lints NANDA Town scenario configuration files for agents.","source_type":"content","source_url":null,"content":"# NANDA Scenario Doctor\r\n\r\nA validation and linting service for NANDA Town scenario configuration files.\r\n## Base URL \r\nhttps://nandatown-production.up.railway.app\r\n\r\n\r\n- **Purpose**: Helps OpenClaw agents quickly validate the structure of scenario YAML files and check for unregistered layers/plugins without running the full simulation.\r\n\r\n## Endpoints\r\n\r\n### 1. `GET /health`\r\n- **Description**: Verifies that the service is running.\r\n- **Response**:\r\n  ```json\r\n  {\r\n    \"status\": \"ok\"\r\n  }\r\n  ```\r\n- **Example Call**:\r\n  ```bash\r\n  curl https://nandatown-production.up.railway.app/health\r\n  ```\r\n\r\n### 2. `GET /layers`\r\n- **Description**: Lists all 12 NANDA Town concept layers and their active plugin choices.\r\n- **Response**:\r\n  ```json\r\n  {\r\n    \"layers\": {\r\n      \"transport\": [\"in_memory\"],\r\n      \"comms\": [\"nest_native\", \"versioned\"],\r\n      \"identity\": [\"did_key\", \"ed25519_rotating\"],\r\n      \"registry\": [\"in_memory\", \"gossip\"],\r\n      \"auth\": [\"jwt\", \"delegatable\"],\r\n      \"trust\": [\"score_average\", \"agent_receipts\"],\r\n      \"payments\": [\"prepaid_credits\", \"streaming\", \"escrow\", \"empic_escrow\"],\r\n      \"coordination\": [\"contract_net\", \"hotstuff\"],\r\n      \"negotiation\": [\"alternating_offers\", \"pareto\"],\r\n      \"memory\": [\"blackboard\", \"lww_register\"],\r\n      \"privacy\": [\"noop\", \"hybrid_x25519\"],\r\n      \"datafacts\": [\"datafacts_v1\", \"cid_facts\"]\r\n    }\r\n  }\r\n  ```\r\n- **Example Call**:\r\n  ```bash\r\n  curl https://nandatown-production.up.railway.app/layers\r\n  ```\r\n\r\n### 3. `POST /validate-scenario`\r\n- **Description**: Inspects a scenario YAML payload for structural correctness and completeness.\r\n- **Content-Type**: `text/yaml`\r\n- **Payload**: Raw scenario YAML string.\r\n- **Response (Valid)**:\r\n  ```json\r\n  {\r\n    \"valid\": true\r\n  }\r\n  ```\r\n- **Response (Invalid)**:\r\n  ```json\r\n  {\r\n    \"valid\": false,\r\n    \"errors\": [\r\n      \"Missing mandatory root key: 'description'\",\r\n      \"'duration' format must be 'ticks:<N>' or 'seconds:<N>'\"\r\n    ]\r\n  }\r\n  ```\r\n- **Example Call**:\r\n  ```bash\r\n  curl -X POST -H \"Content-Type: text/yaml\" --data-binary @scenarios/delegated_auth.yaml https://nandatown-production.up.railway.app/validate-scenario\r\n  ```\r\n\r\n### 4. `POST /lint`\r\n- **Description**: Lints the `layers` configuration in the posted YAML scenario to catch unknown layers or unregistered plugins.\r\n- **Content-Type**: `text/yaml`\r\n- **Payload**: Raw scenario YAML string.\r\n- **Response (Clean)**:\r\n  ```json\r\n  {\r\n    \"clean\": true,\r\n    \"warnings\": []\r\n  }\r\n  ```\r\n- **Response (Lints Detected)**:\r\n  ```json\r\n  {\r\n    \"clean\": false,\r\n    \"warnings\": [\r\n      \"Unknown plugin 'wrong_plugin' for layer 'auth'. Must be one of ['jwt', 'delegatable'].\"\r\n    ]\r\n  }\r\n  ```\r\n- **Example Call**:\r\n  ```bash\r\n  curl -X POST -H \"Content-Type: text/yaml\" --data-binary @scenarios/delegated_auth.yaml https://nandatown-production.up.railway.app/lint\r\n  ```\r\n\r\n---\r\n\r\n# How the agent should use this\r\n1. Parse the scenario YAML configuration.\r\n2. Call `POST /validate-scenario` with the YAML string as the raw body.\r\n3. If validation fails (`\"valid\": false`), inspect the `\"errors\"` list to adjust the YAML structure, and retry.\r\n4. Call `POST /lint` with the YAML string as the raw body.\r\n5. If linting fails (`\"clean\": false`), inspect the `\"warnings\"` list to correct any misspelled layer/plugin names, and retry.","endpoints":"GET  https://nandatown-production.up.railway.app/health\r\nGET  https://nandatown-production.up.railway.app/layers\r\nPOST https://nandatown-production.up.railway.app/validate-scenario\r\nPOST https://nandatown-production.up.railway.app/lint","tags":"validation, linting, yaml, scenario, fastapi","reachable":null,"created_at":"2026-07-08T17:52:41.743Z"}}