You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: utils/ai/AGENT.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ This repository contains the MCU firmware for the Worldcoin Orb, built with Zeph
10
10
11
11
- Keep changes small and compiling.
12
12
- Prefer existing patterns; do not introduce new dependencies without asking.
13
+
- When design intent is unclear, inspect commit history before changing behavior.
13
14
- If unsure, propose 2 options with tradeoffs (don't guess).
14
15
15
16
## Path Discovery
@@ -199,6 +200,44 @@ See [Twister documentation](https://docs.zephyrproject.org/latest/develop/test/t
199
200
- If the repo defines formatting/lint scripts, run them.
200
201
- Don't reformat unrelated code.
201
202
203
+
## Design Decision Archaeology
204
+
205
+
When a requested change touches behavior whose rationale is unclear, treat git history as part of the documentation. Commit messages, old diffs, and PR references often explain why the current design exists.
206
+
207
+
Use this workflow before changing behavior in non-trivial paths:
208
+
209
+
1. Identify the relevant files, symbols, Kconfig options, devicetree nodes, and log messages with `rg`.
210
+
2. Inspect file history in the owning repo:
211
+
```bash
212
+
git log --follow --oneline -- <path>
213
+
git log --follow -p -- <path>
214
+
```
215
+
3. Inspect line or symbol history when the relevant code is localized:
216
+
```bash
217
+
git blame -L <start>,<end> -- <path>
218
+
git log -S'<symbol-or-string>' -- <path>
219
+
git log -G'<regex>' -- <path>
220
+
```
221
+
4. Search commit messages for the design concept and nearby terms:
0 commit comments