infomesh copilot-instructions.md

A project guide for InfoMesh, a decentralized peer-to-peer search engine designed for AI assistants. It explains the project’s purpose, principles, technology choices, and code layout.

In plain words
What is it for?
Use it when working on InfoMesh’s crawling, indexing, search, peer-to-peer networking, or Model Context Protocol integration.
Why use it?
It gives coding agents the project context they need to make changes that fit InfoMesh’s architecture and goals.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/dotnetpower/infomesh/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/dotnetpower/infomesh

Made for: GitHub Copilot.

Per session 13,682 This file is loaded in full into every session.
When invoked 13,682 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.13682 $0.13682
Opus 5 $0.06841 $0.06841
Sonnet 5 $0.02736 $0.02736
Haiku 4.5 $0.01368 $0.01368

Measured 2d ago against content hash 77bc01122659, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

infomesh copilot-instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/copilot-instructions.md · 812 lines

How it starts

The opening of the file, as written. The whole thing — 812 lines — stays where its author put it; the contents beside it link to each section on GitHub.

InfoMesh — Copilot Instructions

Project Overview

InfoMesh is a fully decentralized P2P search engine designed exclusively for LLMs. It crawls, indexes, and searches the web via a peer-to-peer network and exposes results through MCP (Model Context Protocol) — no human-facing UI required.

Mission: InfoMesh does not compete with commercial search providers. These companies serve human search at massive scale with ads-based monetization. InfoMesh provides minimal, sufficient search capabilities for LLMs — for free, via MCP — democratizing real-time web access for AI assistants without per-query billing. It is a community-driven public utility, complementary to existing search providers.

Core Principles

Principle Description
Fully Decentralized No central server. Every node is both a hub and a participant.
LLM-First No browser UI. Pure text API optimized for LLM consumption.
Contribute = Reward More crawling contribution → more search quota (cooperative tit-for-tat model).
Offline-Capable Local index is searchable without internet.
Privacy Search queries are never recorded centrally.

Tech Stack

Layer Technology Notes
Language Python 3.12+ Use modern Python features (type hints, match, type statement, StrEnum, etc.)
P2P Network libp2p (py-libp2p) Optional (pip install 'infomesh[p2p]'). DHT, Noise encryption built-in. Uses trio, not asyncio — see note below
DHT Kademlia Distributed hash table for index & crawl coordination
Crawling httpx + asyncio Async-first HTTP client
HTML Parsing trafilatura Best accuracy for main-content extraction
Keyword Index SQLite FTS5 Zero-install, embedded full-text search
Vector Index ChromaDB Semantic search with embeddings
MCP Server mcp-python-sdk VS Code / Claude / Cursor / Windsurf integration
Admin API FastAPI Local status & config endpoints
Serialization msgpack Faster and smaller than JSON
Compression zstd Level-tunable compression; dictionary mode for similar documents
Local LLM ollama / llama.cpp Optional local summarization (Qwen 2.5, Llama 3.x, etc.)
Logging structlog Structured logging for all library code
Package Manager uv Fast Python package/project manager (replaces pip/venv)
Build Backend hatchling PEP 517 build backend for PyPI distribution
JS Rendering Playwright Optional headless Chromium (pip install 'infomesh[browser]')
CJK Tokenization jieba Optional Chinese segmentation (pip install 'infomesh[cjk]')

Read the full file on GitHub · 812 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 812 lines · 13,682 tokens per session scan A 77bc01122659

Subscribe to this mod's changes

infomesh copilot-instructions.md is an instructions file published in the GitHub repository dotnetpower/infomesh (5 stars, last pushed 3mo ago), licensed MIT. It adds 13,682 tokens to every session, about $0.0684 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.