Every subproject should contain two documentation files:

- prompt.txt — notes useful for driving development (context, design decisions, conventions, TODOs, notes for the agent).
- README.md — notes useful for using the project/library (installation, running, API, examples).

Before working on a given subproject, read its prompt.txt; when you need "how to use it" knowledge, reach for README.md.

prompt.txt files must NOT store a change history — no changelog, no "what used to be", no "previously X, now Y". They describe only the current factual state. After a non-trivial change in a subproject, update its prompt.txt in place — new decisions, conventions, nuances, traces of leaks/incidents, changes to resource shapes (`status://overview`, etc.). Update README.md only when the change affects usage (installation, API, running). If a section of prompt.txt is stale after a change — overwrite it, don't stack contradictory layers or append history.

Repo-wide docs: README.md (root), docs/coding_style.md, docs/roadmap.md, oth/schema.png (system diagram).

Subfolder map — what each module is for (details in their prompt.txt):
- host/agent0/             — MCP client + Claude API (agent loop connecting to the gateway).
- gateway_mcps/            — MCP aggregator: one server exposes tools/resources from many MCP backends and delegates calls back to the right backend.
- mcps/mcp_nostr/          — MCP server for the Nostr protocol (connect/publish/get_events, managing the user's identities). Works directly with relays, not the DB.
- mcps/mcp_nostr_db/       — ingests the Nostr network into a DuckDB database + an admin MCP giving agents read-only access to the collected data (`run_sql`, tracked-pubkey statuses).
- mcps/mcp_nostr_explorer/ — web GUI (FastAPI+WS) over the `nostr` sub-agent: ask in natural language, the agent queries the DB, results render as tables.
- mcps/mcp_user/           — MCP server for interacting with the user (date/time, HTML GUI over WS, speech-to-text, user selection, shared drive).
- exec_mcp/                — HTTP → MCP bridge: FastAPI server exposing `POST /execTool` (port 8122) so non-MCP callers can invoke tools on any local MCP server; target port encoded in the tool name (`mcp__<port>_..__<tool>`).
- oth/mcp_helpers/         — shared library: `signed_tool` (signed tools) and `code_updater` (code self-edit). Imported by the MCP servers.
- tools/mcp_nostr_status/  — operational tool: snapshot of mcp_nostr_db status.

All subprojects now have both prompt.txt and README.md, all in English. Keep it that
way — every new subproject gets both, written in English.

Subproject venvs (do NOT use the system `python` nor `/root/python/venv` — they lack dependencies):
- mcps/mcp_nostr_db: `mcps/mcp_nostr_db/admin/mcp/.venv/bin/python` (duckdb, fastmcp, bech32, websockets, coincurve, …)
  - status snapshot: `tools/mcp_nostr_status/status.sh` (sets up that venv itself)

Repo owner on Nostr — display_name "Asocjal":
- npub: npub14t68sepw5ydq9atxhftq5sjuul8mzkudd6em8x8hxggd9vg4snwsmxv60g
- hex:  aaf478642ea11a02f566ba560a425ce7cfb15b8d6eb3b398f73210d2b11584dd
