Translated from the Chinese original. Where the two disagree, the original is authoritative.

Confer — Project memory (.claude/peers/)

Defines the file format for knowledge accumulated into a project under the Claude Code integration. This is one of Confer’s core innovations: let vendor knowledge travel with the project, never lost across sessions, developers, or devices.

Status (2026-09-01): this document describes the target form. What ships today is server-side project memory — the MCP tools read_project_memory / write_project_memory keep facts / decisions in your own instance’s project_memory table (unique per user × project × peer), still as Markdown. The .claude/ file layout below, confer.toml parsing, and automatic fact extraction are not implemented yet; see v0.2 in 08-mvp-backlog.md.

Directory structure

Under each project root:

.claude/
├── confer.toml                   # project configuration (peers, trust levels)
└── peers/
    ├── abc-industries/
    │   ├── facts.md              # verified facts, structured
    │   ├── decisions.md          # a record of design decisions
    │   ├── conversations/        # full conversation history
    │   │   ├── 2024-11-15-modbus-setup.md
    │   │   └── 2024-11-20-temp-calibration.md
    │   ├── snippets/             # code snippets
    │   │   └── read_temp.py
    │   └── meta.json             # peer metadata
    └── internal-sdk/
        ├── facts.md
        └── ...

Travels with git, shared by all collaborators.

File format

meta.json

{
  "peer": {
    "slug": "abc-industries",
    "did":  "did:web:acme.com:agents:support",
    "name": "ABC Industries Support",
    "endpoint": "https://acme.com/a2a/v1",
    "authority": ["X100", "X200", "Modbus", "RTU", "TCP"],
    "languages": ["en", "zh", "de"]
  },
  "trust": "high",
  "registered_at": "2024-11-01T10:00:00Z",
  "last_synced_at": "2024-11-15T14:30:00Z",
  "stats": {
    "total_queries": 47,
    "total_facts": 23,
    "total_decisions": 6
  }
}

facts.md

A structured list of facts. Every fact must carry a citation — a “fact” without a citation is a hallucination.

# ABC Industries facts (project: modbus-integration)

> Auto-maintained by Confer. Each entry is verified by ABC Industries Agent
> with primary source citation. Do not edit machine-generated entries directly;
> use `confer memory edit` to propose changes.

## Modbus register map (X100)

- `0x40-0x47`: Temperature, 4 channels, units of 0.1°C, int16 signed
- `0x48-0x4F`: Pressure, 4 channels, units of 0.01 MPa, uint16
- `0x50-0x57`: Reserved (do not write)
- Function code: **0x03** (Read Holding Registers) — recommended
- Byte order: big-endian (high byte first)
- Default slave ID: **0x0A (10)** — not 1 as docs imply
  - Source: X100 communication manual v3.2 p.87
  - Source: X100 installation guide p.12 (slave ID note)
  - Verified: 2024-11-15 via ask_peer

## Wiring (X100)

- Power: 24V DC ± 10%, max 500mA
- RS-485 termination: 120Ω at both ends
- Cable length max: 1200m at 9600 baud, 500m at 115200 baud
  - Source: X100 installation manual v3.2 p.45
  - Verified: 2024-11-15

## RTU mode timing

- Inter-character timeout: ≥ 1.5 character times
- Inter-frame timeout: ≥ 3.5 character times
- Recommended polling interval: 200ms or more
  - Source: X100 communication manual v3.2 p.103
  - Note: 100ms works but no CRC retry budget left
  - Verified: 2024-11-15

Format conventions:

decisions.md

Design decisions made in the project that relate to this peer. Unlike facts (the vendor’s authoritative conclusions), decisions are our own choices.

# Decisions (project: modbus-integration, peer: abc-industries)

## D1: Use async polling at 200ms

**Date**: 2024-11-15
**Made by**: laowang (with consultation from ABC Agent)
**Status**: Active

We poll the X100 temperature/pressure registers every 200ms using async I/O.

**Alternatives considered:**
- 100ms polling — rejected: insufficient CRC retry budget
- Event-driven (X100 push) — not supported by this firmware

**Why this works for us**: 200ms latency is acceptable for our control loop;
async I/O lets us poll multiple devices concurrently.

**References:**
- See facts: "RTU mode timing"
- Conversation: 2024-11-15-modbus-setup.md
- Code: src/modbus/x100_client.py

---

## D2: Treat slave ID 10 as default; require explicit override

**Date**: 2024-11-15
**Made by**: laowang
**Status**: Active

After verification with ABC Agent that the documented "slave ID 1" is wrong
and actual default is 10, we hardcoded `DEFAULT_SLAVE_ID = 10` and require
explicit override via env variable for non-default installations.

**Why**: The vendor's docs and reality diverge. We trust verified vendor
statements over published docs.

**References:**
- See facts: "Modbus register map (X100)" → slave ID note

Format conventions:

conversations/{date}-{slug}.md

Full conversation history. Confer automatically archives every thread here.

---
thread_id: thread_8f3a9c
peer: did:web:acme.com:agents:support
date: 2024-11-15
participants: [laowang, abc-industries-agent]
via: claude-code
status: closed
tags: [modbus, registers, x100]
summary: |
  Confirmed register map for X100 temperature and pressure sensors.
  Clarified function code recommendation and slave ID default.
---

# Modbus setup conversation

## laowang
I need a Modbus integration for the X100: 4 temperature channels + 4 pressure channels, polled.

## ABC Agent
Modbus RTU register map:
- 0x40–0x47 temperature (4 channels)
- 0x48–0x4F pressure (4 channels)
A 200 ms polling interval is recommended; use function code 0x03 for consecutive reads.

📎 Source: X100 communication manual v3.2 p.87

## laowang
Is a consecutive read a performance problem? Will the slave device stall?

## ABC Agent
Reading 8 consecutive registers is a single request, so it will not stall. Note that
the slave ID defaults to 0x0A (10), not 1 — the older manual has this wrong.

📎 Source: X100 installation guide p.12, FAQ #4

File naming conventions

Write and read flow

Write path

ask_peer is called →
  Confer cloud returns the answer →
  the MCP server extracts a structured fact →
  appends it to the local facts.md (if the fact is new)
  appends the full conversation to conversations/
  updates meta.json
  local commit hint: suggest the user run git add .claude/peers/{slug}/

Read path

a Claude Code session starts →
  scans .claude/peers/*/ →
  feeds each peer's facts.md to Claude Code as part of the system prompt →
  Claude Code cites those facts naturally while writing code

Conflict handling

If the same fact is verified multiple times:

For example:

- Default slave ID: ~~0x01 (1)~~ **0x0A (10)**
  - Source: X100 communication manual v3.2 p.12 (says 1)
  - Source: X100 installation guide p.12 (says 10) ← latest verification
  - ⚠️ Conflict: Vendor's two docs disagree. Use 10 per latest verification.
  - Verified: 2024-11-15

Syncing to the server

Optionally sync project memory to the Confer server (a user toggle, local-first by default):

confer sync push    # upload the local .claude/peers/
confer sync pull    # pull the latest version from the server (for team collaboration)

The server stores it in the project_memory table (see docs/04-data-model.md).

Why local-first by default:

How citations are presented

When generating code, Claude Code automatically adds citation comments for facts drawn from facts.md:

# X100 register map: 0x40-0x47 temperature, 4 channels, int16 signed
# Source: X100 communication manual v3.2 p.87 (verified 2024-11-15 via ABC Agent)
TEMP_REG_START = 0x40
TEMP_REG_COUNT = 8

# Default slave ID is 10 (not 1 as initial docs say)
# Source: .claude/peers/abc-industries/facts.md → D2 decision
DEFAULT_SLAVE_ID = 10

This way the code itself carries a chain of evidence for “why it is written this way.”

Privacy and security

Acceptance criteria

← Back to Confer A2A · DID:web · RFC 9421 · NANDA