{"id":"ac586410fefba90b257e67bcb303f1d3ab46e08a179595ee242db004c629246d","pubkey":"a8d1560d6a647d501699167246f237b36fb123f89168fda11dc743533fec7a08","created_at":1748643261,"kind":30817,"tags":[["d","documentation-and-wikis-with-spaces-and-format-declaration"],["title","Documentation and Wikis with Spaces and Format Declaration"],["k","31055"],["k","31056"],["k","31057"],["k","31058"],["client","nostrnips.com"]],"content":"## Documentation and Wikis with Spaces and Format Declaration\n\n`draft` `optional`\n\n### Summary\nThis NIP introduces a system for collaborative documentation and wikis on Nostr. It improves upon earlier efforts by adding namespace-like Spaces, explicit content format declaration, and clearer separation of article types, including redirects and merge requests.\n\n---\n\n### Motivation\n\nPrevious approaches to wiki-style collaborative content on Nostr had two key limitations:\n\n1. **Format instability** – No declared format per event led to breaking changes (e.g. a shift from Markdown to Asciidoc).\n2. **Lack of namespace separation** – All articles existed in a global space, causing confusion and collision between unrelated projects.\n\nThis NIP addresses both by introducing:\n\n- **Spaces** – individually defined wikis or documentation sets.\n- **Explicit per-article format declaration**.\n- **Dedicated event kinds** for articles, redirects, merge requests, and space metadata.\n\n---\n\n### Specification\n\n#### `kind: 31055` – **Space Definition**\n\nDefines a project namespace for articles.\n\n**Tags**:\n- `[\"name\", \"<space title>\"]`\n- `[\"slug\", \"<short identifier>\"]`\n- `[\"description\", \"<optional description>\"]`\n- `[\"language\", \"<ISO language code>\"]`\n- `[\"license\", \"<license text or SPDX ID>\"]`\n\n**Content**: (optional) full description or README for the space.\n\n---\n\n#### `kind: 31056` – **Article**\n\nAn article in a specific format belonging to a defined space.\n\n**Tags**:\n- `[\"space\", \"<slug>\"]`\n- `[\"title\", \"<article title>\"]`\n- `[\"format\", \"markdown\" | \"asciidoc\" | \"wikitext\" | \"html\"]`\n- `[\"format-version\", \"<format version>\"]` (optional)\n- `[\"prev\", \"<event-id>\"]` (optional)\n- `[\"summary\", \"<short change summary>\"]` (optional)\n\n**Content**: full body of the article in the declared format.\n\n---\n\n#### `kind: 31057` – **Redirect**\n\nRedirects from one article title to another within the same space.\n\n**Tags**:\n- `[\"space\", \"<slug>\"]`\n- `[\"from\", \"<old title>\"]`\n- `[\"to\", \"<new title>\"]`\n\n**Content**: empty.\n\n---\n\n#### `kind: 31058` – **Merge Request**\n\nProposes a revision to an article without directly altering the original.\n\n**Tags**:\n- `[\"space\", \"<slug>\"]`\n- `[\"title\", \"<article title>\"]`\n- `[\"base\", \"<event-id>\"]`\n- `[\"format\", \"<format>\"]`\n- `[\"comment\", \"<short summary>\"]` (optional)\n\n**Content**: proposed article content.\n\n---\n\n### Format Guidelines\n\nCurrently allowed formats:\n- `markdown`\n- `asciidoc`\n- `wikitext`\n- `html`\n\nClients MUST ignore formats they do not support. Clients MAY apply stricter formatting rules.\n\n---\n\n### Client Behavior\n\nClients:\n- MUST render only supported formats.\n- MUST treat `space` as a case-sensitive namespace.\n- SHOULD allow filtering, browsing and searching within Spaces.\n- SHOULD support revision tracking via `prev`.\n- MAY support diff/merge tooling for `kind: 31058`.\n\n---\n\n### Examples\n\n#### Space Definition\n```json\n{\n  \"kind\": 31055,\n  \"tags\": [\n    [\"name\", \"Bitcoin Docs\"],\n    [\"slug\", \"btc-docs\"],\n    [\"description\", \"Developer documentation for Bitcoin tools\"],\n    [\"language\", \"en\"],\n    [\"license\", \"MIT\"]\n  ],\n  \"content\": \"Welcome to the Bitcoin Docs Space.\"\n}\n```\n\n#### Markdown Article\n```json\n{\n  \"kind\": 31056,\n  \"tags\": [\n    [\"space\", \"btc-docs\"],\n    [\"title\", \"Installation Guide\"],\n    [\"format\", \"markdown\"]\n  ],\n  \"content\": \"# Installation\\n\\nFollow these steps to install the software...\"\n}\n```\n\n#### Asciidoc Article\n```json\n{\n  \"kind\": 31056,\n  \"tags\": [\n    [\"space\", \"btc-docs\"],\n    [\"title\", \"RPC Reference\"],\n    [\"format\", \"asciidoc\"]\n  ],\n  \"content\": \"= RPC Reference\\n\\nThis section describes JSON-RPC calls.\"\n}\n```\n\n#### Wikitext Article\n```json\n{\n  \"kind\": 31056,\n  \"tags\": [\n    [\"space\", \"btc-docs\"],\n    [\"title\", \"Block Structure\"],\n    [\"format\", \"wikitext\"]\n  ],\n  \"content\": \"== Block Structure ==\\n\\nThe structure of a Bitcoin block is...\"\n}\n```\n\n#### Redirect\n```json\n{\n  \"kind\": 31057,\n  \"tags\": [\n    [\"space\", \"btc-docs\"],\n    [\"from\", \"Getting Started\"],\n    [\"to\", \"Installation Guide\"]\n  ],\n  \"content\": \"\"\n}\n```\n\n#### Merge Request\n```json\n{\n  \"kind\": 31058,\n  \"tags\": [\n    [\"space\", \"btc-docs\"],\n    [\"title\", \"Installation Guide\"],\n    [\"base\", \"d72fa1...\"],\n    [\"format\", \"markdown\"],\n    [\"comment\", \"Added step for testnet\"]\n  ],\n  \"content\": \"# Installation\\n\\nNow includes setup instructions for testnet users.\"\n}\n```\n\n---\n\n### Acknowledgements\n\nThis proposal builds on earlier ideas for decentralized wikis and documentation within Nostr, while solving common issues related to format instability and lack of project separation.","sig":"c013bb24607cc6e78a93176f4ba04b687c9b7c1014cf8cd56c68da87c68e4ef3d1c2ce85e5bb23c243d51fd4da35010ce02299530e67098a3faf8be762f56dec"}