Files
ESP32-S3-Touch-LCD-5B/wiki/CLAUDE.md
T

74 lines
3.7 KiB
Markdown

# Wiki Schema
This directory is a **personal knowledge wiki** for the BMW M57N automotive display project. It is maintained by the LLM agent; the human curates sources and asks questions. Read this file before doing anything in `wiki/`.
## What this wiki is for
Domain knowledge that is NOT derivable from the firmware repo:
- BMW M57N engine: sensors, ECU (DDE), CAN bus behavior, reverse-engineered message IDs
- The donor vehicle and the target vehicle (this appears to be an engine-swap project — see [[open-questions]])
- Waveshare ESP32-S3-Touch-LCD-5B hardware: datasheets, pinouts, quirks, gotchas
- Design decisions and their rationale
- Findings from web research, datasheets, forum posts, CAN logs
What does NOT belong here: code structure, build commands, firmware implementation details. The repo itself (and the repo-root `CLAUDE.md`) is the source of truth for those. The wiki may *reference* firmware facts when they matter for domain reasoning (e.g. "firmware currently listens for CAN ID 0x4F"), always marked with `(repo)`.
## 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, CAN 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. `bmw-m57n-engine.md`.
- Every page starts with YAML frontmatter:
```yaml
---
type: entity | concept | source | synthesis
tags: [engine, can-bus, hardware, ...]
updated: 2026-07-15
---
```
- 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 is an automotive project where wrong data gets wired into a vehicle:
- `(verified)` — confirmed on real hardware / real CAN logs by the user
- `(source: X)` — from an ingested source in `raw/`
- `(repo)` — what the firmware currently does (not necessarily correct!)
- `(unverified)` — LLM prior knowledge or forum lore; treat as a hypothesis
- Contradictions between sources 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.
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, 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`, 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.