<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/.claude/agents, branch codex/class-reference-docs</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/tinyusb.git/atom/.claude/agents?h=codex%2Fclass-reference-docs</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/.claude/agents?h=codex%2Fclass-reference-docs'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-07-29T10:29:59Z</updated>
<entry>
<title>hil: split hil_test.py into hil_lock/hil_flash, add pool_check, update rig probes (#3794)</title>
<updated>2026-07-29T10:29:59Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-29T10:29:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=e88fc441ddcaaa5abd4f4673ef2bf29499522dc0'/>
<id>urn:sha1:e88fc441ddcaaa5abd4f4673ef2bf29499522dc0</id>
<content type='text'>
test/hil: add board-pool health check, split hil_test into focused modules (#3794)

Add test/hil/hil_pool_check.py: per-board rig health scan — probe presence,
light-example flash (dfu_runtime; device_info + serial check for host-only
boards), uid re-enumeration, safe recovery (probe authorized-toggle, board
reset), verified board_test re-park, USB topology report, and a markdown
summary table. Missing firmware is built on the spot (tools/build.py, idf.py
for espressif, one get_deps retry); row statuses: ok, flash-failed, failed,
locked. Board locks are always respected, never bypassed.

Refactor hil_test.py into hil_lock.py (flock protocol, controller permits,
hold/release/status CLI; replaces board_lock.py) and hil_flash.py (flashers,
find_firmware, run_cmd). Update WCH probe uids and the board roster in
tinyusb.json; add the hil-pool-check skill.</content>
</entry>
<entry>
<title>agents: target-debugger may escalate to etm-trace, prompt-gated</title>
<updated>2026-07-24T08:56:14Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-24T08:45:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=d7f1bbb6e554820911c4a568e56b6f42f5b4931d'/>
<id>urn:sha1:d7f1bbb6e554820911c4a568e56b6f42f5b4931d</id>
<content type='text'>
Instruction-level trace outranks PC-sampling when samples cannot resolve a
mechanism, but the J-Trace is exclusive per-board hardware: the agent uses
it only when its prompt says the board is trace-wired or the user asked,
and otherwise proposes it in notes - mirroring the lock-force consent rule.
</content>
</entry>
<entry>
<title>docs(skills): tighten esp-target-debug/target-debug; agent routes backends by board family</title>
<updated>2026-07-24T07:55:59Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-24T07:48:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=22a155f091283596ee34550c42c075967841159b'/>
<id>urn:sha1:22a155f091283596ee34550c42c075967841159b</id>
<content type='text'>
- esp-target-debug: de-narrated (~1000 -&gt; 847 words) — session-diary phrasing
  ('this unit', dates, 'we measured') replaced with durable reference facts;
  restructured per-board (P4 vs S3 notes); new Scripted-session gotchas
  section consolidates telnet-halt pattern, ESP_ONLYCPU, and ROM-frame
  guidance; UART-reset recipe stated once
- target-debug: fix run-on seam from the -singlerun insertion
- target-debugger agent: charter now resolves the board family FIRST and
  routes Espressif boards to esp-target-debug as primary playbook; skills
  table re-aligned
- retrieval regression: 4/4 (agent routing, S3 keep-alive quirk, OpenOCD RTT
  on ST-Link, ROM-frame guidance)
</content>
</entry>
<entry>
<title>docs(skills): esp-target-debug — Espressif built-in USB-JTAG backend, rig-verified</title>
<updated>2026-07-24T07:55:59Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-24T07:55:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=5066ac7b31445f64aa6007fbe28f03e049aec0b6'/>
<id>urn:sha1:5066ac7b31445f64aa6007fbe28f03e049aec0b6</id>
<content type='text'>
P4 (hand-wired USB-SJ breakout, GPIO24/25 from header J1):
- COEXISTENCE verified: 303a:1001 + cafe:4008 enumerated simultaneously;
  gdb attach/halt/bt during live CDC traffic; symbolized app backtrace
  (tud_task_ext &lt;- usb_device_task &lt;- vPortTaskWrapper)
- set ESP_RTOS FreeRTOS before board cfg -&gt; full dual-core task list;
  without it, bare 'Remote target'
- attach-may-reset nuance flagged (post-mortem autopsy caution)
- console = UART0 (CP2102 flasher tty) on stock builds; D+/D- swap symptom
  documented (low-speed + error -71 vs full-speed)

S3 (same-port PHY swap):
- boundary captured live in dmesg: same hub port flips 303a:1001 -&gt;
  cafe:4008 as the app boots; openocd 'esp_usb_jtag: could not find or open
  device!' verbatim
- attach/halt/symbol resolution verified via board_test (usb_new_phy absent
  from ELF when CFG_TUD/TUH=0); app-context keep-alive quirk (~4 s
  unattended drop, -71 half-dead, UART esptool reset recovers); cpu1
  OCD_ID=0 -&gt; ESP_ONLYCPU=1; telnet-halt + gdb-read scripted pattern;
  RTC_CNTL PHY-mux reference (0x60008120) + esptool read_mem/write_mem
- target-debug pointer + target-debugger agent table row
</content>
</entry>
<entry>
<title>docs(skills): formatting feedback — agent skill table, probe bullets, aligned columns</title>
<updated>2026-07-24T07:55:59Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-23T06:38:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=9c6c0390a0b163c8ea64145f759118795c45b47f'/>
<id>urn:sha1:9c6c0390a0b163c8ea64145f759118795c45b47f</id>
<content type='text'>
- target-debugger: skill list is now a table referencing skills by name only
  (path pattern stated once).
- target-debug: probe-mapping run-on paragraph split into bullets; drop the
  GDB Ninth-Edition caveat (calibre now holds the Tenth-Edition PDF, id 2264).
- Align markdown table columns across target-debug, usb-sniffer, usbmon, hil,
  usbtest and the agent (7 tables); tables with paragraph-length cells left
  unpadded (usbmon symptom map, usbtest case map).
</content>
</entry>
<entry>
<title>docs(target-debug): vector catch, SWO trace, verifybin, FreeRTOS threads; table integration</title>
<updated>2026-07-24T07:55:59Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-24T07:55:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=21bbcb5bbff18454979a1dc9aaa210e938a004b5'/>
<id>urn:sha1:21bbcb5bbff18454979a1dc9aaa210e938a004b5</id>
<content type='text'>
- Vector catch + Cortex-M fault autopsy, verified with a deliberate bad-load
  on stm32f407disco: CFSR=0x8200 (BFARVALID|PRECISERR), BFAR = exact bad
  address, stacked pc addr2lined to the faulting line; gotchas recorded
  (stale FPB comparators fire phantom SIGTRAPs — scrub first; arm DEMCR
  after reset; loads precise / stores imprecise; ARMv6-M has no CFSR/BFAR)
- SWO exception trace + hw PC sampling gate PASSED on F407: 680 KB of
  packets in 3 s (0x17 PC samples in flash range, 0x0E SysTick enter/exit);
  JLinkSWOViewerCL decodes stimulus only — raw SWORead is the recipe;
  SWOStart needs an explicit speed headless
- verifybin 'Verify successful.'; FreeRTOS -rtos plugin lists all 6
  cdc_msc_freertos tasks after a run-&gt;stop cycle (plain attach = 0xDEAD
  placeholder); semihosting anti-note; monitor-mode pointer (untested)
- Intrusiveness table gains the new rows; agent playbook bullet updated;
  retrieval gate 5/5 with a fresh reader; executed plan committed
</content>
</entry>
<entry>
<title>docs(skills): rename debug skills, drop the PC-host/TinyUSB-device assumption</title>
<updated>2026-07-24T07:55:59Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-23T03:18:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=8918c4fec4a99b174d480c043000fd4405678282'/>
<id>urn:sha1:8918c4fec4a99b174d480c043000fd4405678282</id>
<content type='text'>
Rename usb-target-debug -&gt; target-debug, usb-debug -&gt; usb-kernel-debug,
usb-recover -&gt; usb-kernel-recover (script filenames unchanged), and make all
debug skills/agents decide tool applicability by which end of the link runs
Linux: TinyUSB may run the device or host stack, and its peer may be a Linux
PC, another TinyUSB board, or a Linux gadget (e.g. Raspberry Pi UDC).

- usbmon: exists only when a Linux PC is the link's host
- usb-kernel-debug: either Linux end; allowlist gains dwc3/libcomposite/udc_core
  for the gadget side of a Linux peer
- usb-sniffer: the only full-visibility capture when TinyUSB is the host
- target-debug: covers dcd_* and hcd_*/tuh_ debugging; channel choice by topology
- update target-debugger/hil-operator agents, pre-pr, hil-validate.js, and the
  USB_RECOVER path constant in test/hil/usbtest.py
- CLAUDE.md: fold the dcd/hcd datasheet cross-check rule into the read-doc line
</content>
</entry>
<entry>
<title>agent: add target-debugger — device-side root-cause loop on the HIL rig</title>
<updated>2026-07-17T09:48:03Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-16T07:11:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=b9478a723b6335f3e670453b622d615cebbd7293'/>
<id>urn:sha1:b9478a723b6335f3e670453b622d615cebbd7293</id>
<content type='text'>
Opus-tier agent charter for backgrounding a long hardware debug session:
instrument -&gt; build -&gt; flash under one held board lock -&gt; dual-side
capture -&gt; correlate -&gt; refine, strictly one instance, skills as source
of truth (usb-target-debug, usbmon, usb-debug, usb-sniffer, usb-recover,
hil). The charter encodes what dogfooding established:

- diagnosis standard: evidence must show the mechanism, or a fix must
  flip the ORIGINAL failing case on hardware; stop after two
  evidence-free cycles and hand back a partial diagnosis
- lock cadence: hold for the whole session, release around hil_test.py
  runs (it self-locks per board)
- revert semantics: "fix stays, probe goes, re-verify clean" —
  instrumentation reverted, candidate fix left uncommitted and
  re-verified on a clean build, pristine firmware reflashed before
  lock release

Returns a machine-parseable diagnosis report including ruledOut[] —
disproven hypotheses are deliverables. Spec roster updated (opus/xhigh,
effort requested per agent() call).
</content>
</entry>
<entry>
<title>Fix max-effort review findings in lock protocol, workflows, and docs</title>
<updated>2026-07-13T11:01:07Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-13T11:01:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=ff69550b3d8d55b5c9d48a3dfe4e87f7690e9455'/>
<id>urn:sha1:ff69550b3d8d55b5c9d48a3dfe4e87f7690e9455</id>
<content type='text'>
Confirmed by a 10-finder / 28-verifier adversarial review pass:

board_lock.py — the flock is now the sole authority: drop cmd_hold's
pid-liveness pre-gate (a live hil_test.py pool worker's stale record no
longer blocks a genuinely free board); cmd_release probes the flock and
only signals a verified holder, refuses to kill hil_test.py holders
(CI mid-test), handles PermissionError; the holder daemon truncates its
lock records on SIGTERM and keeps the success pipe clear of fds 0-2
(closed-stdio hold used to leave an orphan holder while reporting
failure); --config default resolves beside the script.

hil_test.py — truncate the lock record on per-board release (pool
workers outlive their flocks); warn instead of silently failing open
when the lock dir is unusable; error out on -b names absent from the
config (was a silent zero-test exit 0, readable as a green HIL run);
drop an emptied board row in accumulate_report (variant boards left a
blank ghost row).

workflows — remove the stray positional arg that made the validate size
stage exit 2 on every run; wrap JSON.parse(args) in all six scripts;
factor pr-babysit's drifted reply recipe into postReplyRecipe and dedup
refutation replies across cycles; validate args.pr and maxCycles;
driver-review rejects an empty dimensions list; hil-validate drops a
dead guard clause and retries diagnostics with -v -r 1.

agents/docs — port-dev scopes git clang-format to its own files
(concurrent workers reformatted each other in shared checkouts);
hil-operator/hil skill wording matches actual fail-fast output; the
implementation plan is now a DO-NOT-EXECUTE historical record (banner +
checked boxes) so plan-executing agents cannot revert shipped files.

Verified: lock storm 1-winner-in-10, stale-record hold, closed-stdio
hold, dead-pid cleanup, CI-holder refusal, ghost-row 4-scenario merge,
unknown-board exit 1, py_compile + check.sh on all six workflows,
pre-commit clean.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01Upj4hta5TNoAbidqeC1zZ6
</content>
</entry>
<entry>
<title>Fix review findings and add static-analyzer agent</title>
<updated>2026-07-10T16:28:09Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-10T16:28:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=0557655afbb9e608c26ac0c6cbf95c6e69138c77'/>
<id>urn:sha1:0557655afbb9e608c26ac0c6cbf95c6e69138c77</id>
<content type='text'>
Review-fix batch (owner-confirmed) on the multi-agent harness:

- board_lock: detach holder stdio so a captured `hold` cannot hang on the
  daemon's inherited pipe; probe locks by holder-pid liveness instead of a
  momentary flock, which could spuriously fail a concurrent acquirer
  (storm-tested: 1 winner in 10, 0/15 acquire failures under probe storm)
- hil_test: locked board renders a visible board-locked fail row so the
  report matches the exit code; stale marker cleared on a real re-run
- pr-babysit: autoPush now opt-in (default dry run); resolve recipe
  paginates reviewThreads; post-push resolve gets issue-comment fallback
- validate: size stage honors non-default base via --base-branch; pvs
  stage delegated to the new agent
- new static-analyzer agent (sonnet): PVS-Studio SAST+MISRA for one
  board, structured findings gated on files changed vs base

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01Rn1AN5DsTdFhRwhugfgKZi
</content>
</entry>
</feed>
