Files
ESP32-S3-LCD-1.3/wiki/CLAUDE.md
T
julian 3613387d41 Add wiki second brain and root CLAUDE.md; retire .docs
- New wiki/ (Obsidian vault) following the LLM Wiki pattern: schema, index, log,
  entity page for the board, concept pages for the A->B link, wired+wireless
  redundancy, and Patrol gauge outputs, open questions, two sources
- New CLAUDE.md distilled from the surviving .docs content: verified pins,
  brightness/receiver/debug APIs, SquareLine rules, CH343 serial notes,
  gear-enum drift warning, Waveshare demo and schematic URLs
- Delete .docs/ (14 files): stale pin-hunting and troubleshooting guides,
  wrong header table, finished phase roadmap, duplicate UART spec (now in the
  5B repo at docs/UART_PROTOCOL.md)
- README.md repointed to CLAUDE.md and wiki/

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-21 10:57:05 +02:00

5.1 KiB

Wiki Schema

This directory is a personal knowledge wiki for the ESP32-S3-LCD-1.3 project — Controller B, the slave/extension unit of the BMW M57N → Nissan Patrol swap display system. It is maintained by the LLM agent; the human curates sources and asks questions. Read this file before doing anything in wiki/.

It is the sibling of the wiki in ../../ESP32-S3-Touch-LCD-5B/wiki/ (Controller A). The two repos are separate git repositories with separate remotes. Never create or edit files outside this repo's directory. Cross-references into the sibling wiki are plain text, not [[wikilinks]] (Obsidian vaults do not link across vaults) — write them as (sibling: 5B wiki → page-name).

What this wiki is for

Domain knowledge that is NOT derivable from the firmware repo:

  • Waveshare ESP32-S3-LCD-1.3 hardware: pinout, free GPIO, peripherals, power, quirks, gotchas
  • The link between Controller A and Controller B: physical layer, packet contract, timing, failure modes, and the wired + BLE redundancy design
  • Controller B's outputs into the Nissan Patrol: driving the cluster's RPM and coolant-temperature gauges, driver electronics, cluster behaviour
  • Design decisions and their rationale; what was tried and why it was rejected
  • Findings from datasheets, forum posts, Waveshare docs, bench measurements, scope traces

What does NOT belong here: code structure, build commands, firmware implementation details. The repo (its root CLAUDE.md and README.md) is the source of truth for those. The wiki may reference firmware facts when they matter for domain reasoning (e.g. "firmware currently times out after 1 s without a packet"), always marked (repo).

Division of labour with the sibling wiki: CAN bus decoding, the BMW engine, the donor vehicle and the swap itself live in the 5B wiki. This wiki only records what Controller B needs from that work (which signals it consumes, which packet fields carry them). Do not duplicate CAN ID tables here — point at the sibling.

Layout

wiki/
  CLAUDE.md      # this schema — co-evolves with the workflow
  index.md       # catalog of all pages, by category — update on EVERY change
  log.md         # append-only chronological record of ingests/queries/lints
  raw/           # immutable source documents (web clips, PDFs, photos, scope captures, logs) — NEVER edit
  sources/       # one summary page per raw source
  pages/         # entity & concept pages (the heart of the wiki)

Page conventions

  • Filenames: kebab-case, e.g. esp32-s3-lcd-1-3.md.
  • Every page starts with YAML frontmatter:
    ---
    type: entity | concept | source | synthesis
    tags: [hardware, link, gauges, ble, ...]
    updated: 2026-09-21
    ---
    
  • Link liberally with [[wikilinks]]. A link to a not-yet-existing page marks future work, not an error.
  • Confidence labels are mandatory for factual claims — this unit drives real gauges in a real vehicle:
    • (verified) — confirmed on real hardware / with a meter or scope by the user
    • (source: X) — from an ingested source in raw/ (summarised in sources/)
    • (repo) — what the firmware currently does (not necessarily correct!)
    • (sibling: 5B wiki → page) — established in the Controller A wiki; check there before relying on it
    • (unverified) — LLM prior knowledge, forum lore, or a design proposal; treat as a hypothesis
  • Contradictions between sources — including between the two repos' copies of the shared protocol header — get flagged inline with a > [!warning] callout, not silently resolved.

Workflows

Ingest

  1. User drops a file into raw/ and asks to process it.
  2. Read it fully. Discuss key takeaways with the user if interactive.
  3. Write sources/<name>.md: frontmatter, 1-paragraph summary, key facts as bullets, relevance to open questions.
  4. Update every affected page in pages/ — integrate, don't append blindly. Flag contradictions.
  5. Update index.md, append to log.md.

Query

  1. Read index.md first, then drill into relevant pages. If the question touches CAN decoding or the vehicle, also read the sibling wiki's index.md.
  2. Synthesize an answer with citations (page links + confidence labels).
  3. If the answer is durable (a comparison, an analysis, a decision), file it as a new page and index it.

Lint (periodic, on request)

Check for: contradictions, stale claims, orphan pages, [[links]] to pages worth creating, unverified claims that could now be verified, drift between this repo's and the sibling repo's protocol header, gaps worth a web search. Report findings; fix with user's blessing.

Log format

Append-only. Each entry starts with ## [YYYY-MM-DD] <op> | <title> where <op> is ingest, query, lint, update, or setup. Greppable with grep "^## \[" log.md.

Prime directives

  1. raw/ is immutable.
  2. Never let an (unverified) claim silently upgrade itself — only real-world verification by the user promotes a claim to (verified).
  3. Keep index.md and log.md current on every operation; a stale index is worse than no index.
  4. Nothing outside this repo directory is ever written by work on this wiki.