agentleFS
littlebearappslittlebearapps/untether/.github/copilot-instructions.md

untether

Copilot instructions72 starsChanged 4 months agoMITView on GitHub

Untether is a Telegram bridge for AI coding agents (Claude Code, Codex, OpenCode, Pi, Gemini CLI, Amp). It runs on the user's machine and bridges agents to Telegram, so users can send tasks by voice or text, approve changes, and read results from their phone — while agents work in the background. Runners (src/untether/runners/) manage engine subprocesses, emit events via the 3-event contract (StartedEvent → ActionEvent(s) → CompletedEvent). RunnerBridge connects runners to the TelegramPresenter which handles message rendering and inline…

The file

We split this copilot-instructions.md into the rules it gives an agent

9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use match/case, type | None unions, and other Python 3.12+ features

    line 15
  2. Very specific:

    Use anyio for async (not raw asyncio)

    line 16
  3. Very specific:

    Use msgspec.Struct for data classes (not dataclasses or pydantic models for schemas)

    line 17
  4. Very specific:

    Use structlog for logging (not stdlib logging)

    line 18
  5. Very specific:

    All Telegram writes go through TelegramOutbox — never call Bot API directly.

    line 24
  6. Very specific:

    Verify the 3-event contract: StartedEvent → ActionEvent(s) → CompletedEvent

    line 30
  7. Very specific:

    Use pytest-anyio for async tests

    line 31
  8. Distinctive:

    Every bug fix references a GitHub issue

    line 37
  9. Distinctive:

    Update CHANGELOG.md for user-facing changes

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Untether — Copilot Instructions

Untether is a Telegram bridge for AI coding agents (Claude Code, Codex, OpenCode, Pi, Gemini CLI, Amp). It runs on the user's machine and bridges agents to Telegram, so users can send tasks by voice or text, approve changes, and read results from their phone — while agents work in the background.

Stack

  • Python 3.12+, anyio (async), msgspec (JSONL parsing), structlog (logging)
  • Ruff (linting/formatting), pytest + anyio (testing), 80% coverage threshold
  • pydantic-settings for config, httpx for HTTP, typer for CLI

Code style

  • Australian English in user-facing strings (realise, colour, behaviour, licence)
  • Type hints on all public functions
  • Use match/case, type | None unions, and other Python 3.12+ features
  • Use anyio for async (not raw asyncio)
  • Use msgspec.Struct for data classes (not dataclasses or pydantic models for schemas)
  • Use structlog for logging (not stdlib logging)

Architecture

Runners (src/untether/runners/) manage engine subprocesses, emit events via the 3-event contract (StartedEvent → ActionEvent(s) → CompletedEvent). RunnerBridge connects runners to the TelegramPresenter which handles message rendering and inline keyboards.

All Telegram writes go through TelegramOutbox — never call Bot API directly.

Testing patterns

  • Stub subprocess runners with fake CLI scripts for engine tests
  • FakeTransport protocol doubles instead of real Telegram clients
  • Verify the 3-event contract: StartedEvent → ActionEvent(s) → CompletedEvent
  • Use pytest-anyio for async tests

Commit conventions

  • Conventional commits: feat:, fix:, docs:, refactor:, test:
  • Feature branches: feature/*, fix/*, docs/*
  • Every bug fix references a GitHub issue
  • Update CHANGELOG.md for user-facing changes

Commands

Key Telegram commands: /cancel, /agent, /model, /planmode, /usage, /stats (session statistics), /auth (Codex re-auth), /export, /browse, /config, /verbose, /restart.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.