agentleFS
RAIT-09RAIT-09/obsidian-agent-client/.github/copilot-instructions.md

obsidian-agent-client

Copilot instructions2.4k starsChanged 10 months agoApache-2.0View on GitHub

Trending

Less talk lately.thin dataabout the whole repository

Dec 2025: 1 mentionJan 2026: 4 mentionsFeb 2026: 2 mentionsMar 2026: 2 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 1 mentionJul 2026: 1 mentionAug 2026: 1 mentionSep 2026: 0 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the RAIT-09/obsidian-agent-client repository that our weekly crawl found: only 13 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about RAIT-09/obsidian-agent-client

The biggest 5 of 13 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 13

Talked about on GitHub and Bluesky (13 times).

On GitHub · 9

4 more on GitHub

On Bluesky · 4

The file

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

8 rules. About 0 are common, 0 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

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

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

    Keep src/domain/ dependency-free: no obsidian imports, no @agentclientprotocol/sdk imports.

    line 16
  2. Very specific:

    Add new behavior as hooks under src/hooks/ and compose them in ChatView.tsx (avoid introducing ViewModel/UseCase classes).

    line 17
  3. Very specific:

    Put non-React business logic in src/shared/ as pure functions (see message-service.ts).

    line 18
  4. Very specific:

    Use the unified pipeline: AcpAdapter.onSessionUpdate(...) → useChat.handleSessionUpdate(...).

    line 22
  5. Very specific:

    When merging tool-call content, preserve existing values when updates are undefined and treat diffs as replace-all (see …

    line 24
  6. Very specific:

    Use Obsidian Platform.isWin/isMacOS/isLinux helpers (avoid process.platform).

    line 28
  7. Very specific:

    Don't detach leaves in onunload.

    line 30
  8. Very specific:

    Keep styling in styles.css (avoid JS style manipulation).

    line 31

≈ “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

GitHub Copilot Instructions (obsidian-agent-client)

Big picture

  • Obsidian desktop plugin (React 19 + TypeScript) that chats with external coding agents via Agent Client Protocol (ACP).
  • Uses a React Hooks Architecture: hooks own state/logic, components render, adapters integrate external systems, domain is pure types.

Key directories / “where to change things”

  • UI composition + adapter instantiation: src/components/chat/ChatView.tsx (creates adapters via useMemo, composes hooks).
  • Session lifecycle + agent switching: src/hooks/useAgentSession.ts.
  • Message state + streaming updates: src/hooks/useChat.ts.
  • ACP process + JSON-RPC wiring: src/adapters/acp/acp.adapter.ts.
  • Pure message prep/sending (mentions, auto-mention, WSL path conversion): src/shared/message-service.ts.
  • Domain contracts only (no deps): src/domain/models/*, src/domain/ports/*.

Architectural rules (project-specific)

  • Keep src/domain/** dependency-free: no obsidian imports, no @agentclientprotocol/sdk imports.
  • Add new behavior as hooks under src/hooks/ and compose them in ChatView.tsx (avoid introducing ViewModel/UseCase classes).
  • Put non-React business logic in src/shared/ as pure functions (see message-service.ts).
  • Adapters implement ports and isolate protocol/platform churn (ACP changes should mostly stay in src/adapters/acp/).

SessionUpdate / tool-call update flow (critical)

  • Use the unified pipeline: AcpAdapter.onSessionUpdate(...) → useChat.handleSessionUpdate(...).
  • Tool calls must be updated via useChat.upsertToolCall(...) using functional setMessages((prev) => ...) to avoid race conditions from streaming tool_call_update events.
  • When merging tool-call content, preserve existing values when updates are undefined and treat diffs as replace-all (see mergeToolCallContent in useChat.ts).

Obsidian & platform constraints

  • Desktop-only: ChatView throws when !Platform.isDesktopApp.
  • Use Obsidian Platform.isWin/isMacOS/isLinux helpers (avoid process.platform).
  • No innerHTML/outerHTML; use Obsidian element helpers (createEl/createDiv/createSpan).
  • Don't detach leaves in onunload.
  • Keep styling in styles.css (avoid JS style manipulation).

Developer workflows

  • Dev watch build: npm run dev (esbuild watch; outputs main.js).
  • Production build: npm run build (runs tsc -noEmit -skipLibCheck then esbuild production).
  • Formatting: npm run format / npm run format:check (Prettier).
  • Linting: npm run lint / npm run lint:fix.
  • Docs site: npm run docs:dev, npm run docs:build, npm run docs:preview.

Naming conventions used throughout

  • Ports: *.port.ts
  • Adapters: *.adapter.ts
  • Hooks: use*.ts
  • Components: PascalCase.tsx
  • Utilities/models: kebab-case.ts

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.