summaryrefslogtreecommitdiff
path: root/.claude
AgeCommit message (Collapse)Author
2026-07-21docs: add read-doc skill, tighten CLAUDE.md and skill docs (#3778)HEADmasterHa Thach
* docs: add read-doc skill for on-demand datasheet lookup Search and read MCU datasheets, reference manuals, errata, and the USB spec from a local Calibre library ($HOME/Documents/calibre-library) instead of answering register/bitfield/pinout questions from model memory. Gated on the library's existence, so it no-ops for contributors who don't have it. * docs: reference read-doc skill and tighten CLAUDE.md Point the datasheet/reference entry at the new read-doc skill, and trim sections that only duplicate a skill already owning the detail: PVS-Studio and Code Size collapse to pointers; GDB/Build/Flash command blocks condensed to essentials. 213 -> 129 lines; behavioral guidelines and the validation checklist unchanged. * docs: tighten skill redundancy; rename AGENTS.md refs to CLAUDE.md code-size: fold the step list into a sentence and drop invocation examples the argument tables already cover. hil: merge the duplicated self-lock bullets and compress the hifiphile note. usbmon: compress the group-membership setup paragraph. All commands, flags, lock rules, and report paths preserved. usb-target-debug and the pvs script only get stale AGENTS.md references renamed to CLAUDE.md (now the real file); run_pvs.sh no longer cites a --dump-files mention that CLAUDE.md dropped. * docs: fix review findings — restore Espressif cd step, ELF placeholder, code-size comment Codex/Copilot/Claude review of #3778: the condensed Espressif bullet lost its cd (idf.py resolves the project from CWD, so the command failed from repo root); the GDB example now uses the build/your_app.elf placeholder that docs/troubleshooting.rst established; the code-size invocation comment no longer references --combined, which the shown command doesn't use.
2026-07-18skill(usb-sniffer): make rig references generic, setup as a scripthathach
- Drop the dated/host-specific tap topology; confirm the cabling each session instead (the tap gets re-cabled often), and read the DUT link speed from sysfs to pick --speed. - Genericize the hub-upstream reset-visibility note. - Rewrite "one-time setup" as a copy-paste shell block (udev + binary + Wireshark extcap symlink), keeping only the firmware-command caution.
2026-07-17skill: add usb-sniffer — wire-level capture with the ataradov hardware taphathach
Fourth view in the USB debugging toolset (usbmon = host URBs, usb-debug = host reasoning, usb-target-debug = device firmware, usb-sniffer = what actually crossed D+/D-). Covers the ataradov/usb-sniffer analyzer: headless pcapng capture (--speed ls/fs/hs, --fold, --limit self-exit), Wireshark/tshark analysis recipes, and the wire realities that bite: downstream broadcast, sniffer self-capture noise, xHCI devnum != wire address, tap-point-dependent reset visibility (hub choreography anchors), FS-behind-HS-hub splits. Every recipe hardware-validated on the rig, including the capture-window floor (a 3 s window provably misses the enumeration ladder; 3M packets minimum). Two udev files with distinct audiences, not one: - examples/device/99-tinyusb-examples.rules (renamed from 99-tinyusb.rules): the user-facing rules the examples need — cafe VID access, hidraw, the ModemManager blacklist, a couple of board probes. getting_started.rst, the webusb_serial README and its source comment point here. - tools/88-tinyusb.rules: the HIL rig's private probe/analyzer allowlist, now with the sniffer (6666:6620 + blank FX2LP 04b4:8613). Installed on the rig only; the usb-sniffer skill references it.
2026-07-17agent: add target-debugger — device-side root-cause loop on the HIL righathach
Opus-tier agent charter for backgrounding a long hardware debug session: instrument -> build -> flash under one held board lock -> dual-side capture -> correlate -> 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).
2026-07-17skill: add usb-target-debug — device-side capture & debug on the HIL righathach
Completes the debugging toolset (usbmon = what the host exchanged, usb-debug = why the host acted, usb-sniffer = what crossed the wire): TU_LOG/RTT capture, per-probe GDB autopsy without reset, RAM ring-buffer event trace, J-Link DWT_PCSR PC-sampling, dual-side capture posture, and board-lock rig discipline. Includes the implementation plan it executes. Hard-won warnings baked in from real bring-up sessions: volatile ring buffers vs -Os dead-store elimination, RTT NO_BLOCK_SKIP post-mortem limits (no overwrite mode exists), DHCSR validity anchors for register snapshots, release-lock-before-hil_test, and that a marginal just-recabled link can fake a deterministic firmware bug. Also ignore .claude/worktrees/.
2026-07-15hil: add usb_recover hub-cycle action; drop MosChip skips, gate it as ↵hathach
incompatible The MosChip MCS9990 card is physically removed from the rig: delete its cases-11/25 SKIP workaround (and the now-orphaned SKIP accounting) from usbtest.py and refuse to run outright if a DUT ever sits behind one again. usb_recover.sh gains `hub-cycle <busport>`: uhubctl VBUS cycle of the port feeding the device, walking upstream (parent hub -> root port) until it re-enumerates. Verified on the rig: leaf-level recovery (13-4.4 usbtest device) and full walk to the root port on a dead branch. SKILL.md updated for the action and the two-Renesas topology (root-port ppps is real; leaf 1a40:0201 hubs fake their "ganged" switching). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WxUeX4Yn26KibfjvDg2pN9
2026-07-14dcd(ci_hs): stale overlay fix; run usbtest on lpcxpresso43s67hathach
- dcd_edpt_stall flushes the primed buffer (ENDPTFLUSH), but the aborted transfer's dQH overlay can be left ACTIVE with mid-transfer state; the next prime after clear-halt then resumes the stale overlay instead of loading the fresh qtd, so post-halt IN reads return mid-buffer data (usbtest case 13 'buf[32] = 56 (not 0)', with case 18 failing downstream of the same corruption in the full battery). qhd_start_xfer now clears overlay.active alongside overlay.halted before linking the new qtd. - test/hil(hfp): drop lpcxpresso43s67's device/usbtest skip - the historical first-case wedge no longer reproduces on this branch, and with the overlay fix the board runs 30/30 on its Fresco xHCI host (previously 28/30 with deterministic case 13/18 failures). mimxrt1064_evk (imxrt dcache path) 30/30 regression-clean. - docs(hil skill): document the external hifiphile rig - pool test/hil/hfp.json, SSH-reachable from htpc/ci with no outbound SSH, exercised by the CI hil-tinyusb (hfp.json) job; never run HIL against it during development unless the user explicitly asks. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_017TQZrFfU3K4Y198aLsUpBC
2026-07-14Merge remote-tracking branch 'origin/master' into usbtesthathach
# Conflicts: # .claude/skills/hil/SKILL.md # test/hil/hil_test.py
2026-07-14test/hil: usbtest fleet enablement, shuffled scheduling, unique PIDshathach
Pool/config: - record real uids (ra8m1_ek), enable usbtest for espressif s3/p4, then park ra6m5_ek and ra8m1_ek in boards-skip (ra6m5's usbtest/MSC traffic can kill the uPD720201 host on its ROM firmware; ra8m1 USBHS bring-up pending); max32666/nrf54lm20 stay enabled - their MosChip flakiness never wedges - re-enable device/usbtest on HS boards (mimxrt1064, ch32v307) now that uPD720201 firmware 2.0.2.6 fixes the command-ring death; mimxrt1015 stays skipped - its HS battery killed the controller on both ROM and 2.0.2.6 firmware (board-specific); match the moved host-test bundles (f723 <-> rt1064); skip never-passing tests on the new nrf5340dk/nrf54lm20dk boards and the detached pico host bundle, each documented with a comment Host-controller quirk gating in usbtest.py (auto-skip, self-heals on a healthy xHCI): - MosChip MCS9990 EHCI: case 25 (int-OUT never scheduled, FRINDEX bug) and case 11 (unlinked reads complete short/EREMOTEIO) - Renesas uPD720201 xHCI: firmware-gated. The card must run firmware >= 2.0.2.6 (RAM-uploaded - it reverts to ROM on every power cycle): on older firmware the command ring dies under unlink stress (a Configure Endpoint command stops completing; the hub worker deadlocks holding the device lock; only a host power cycle recovers; three boards reproduced it). usbtest.py reads the FW version register (PCI config 0x6c) and refuses to run at all on older firmware - hil_test surfaces that as a failed test with the reason. On current firmware the full 30-case battery runs (validated FS+HS: metro_m4, f723, f723-DMA all 30/30). Scheduling (hil_test.py): - Shuffle each (board, variant)'s test order with a seeded RNG (HIL_SHUFFLE_SEED to replay) so usbtest batteries and flash churn spread across the timeline instead of convoying on one controller. - Per-controller usbtest + flash semaphores: HIL_USBTEST_PARALLEL (default 4) concurrent usbtest batteries and HIL_FLASH_PARALLEL (default 8) concurrent flashes per host controller. Profiled on uPD720201 firmware 2.0.2.6 across 8/1..12/8: wall time falls 22.2/14.3/12.5/10.8 min at usbtest width 1/2/3/4 and plateaus there; zero controller errors everywhere; first battery case failures (leaf-hub bandwidth stretch) appear at 12/8, and flash width 12 only amplifies flasher-hub contention flakes - so 8/4 is the optimum. A separate battery-window flash throttle was profiled and dropped. - Give every example a unique hardcoded USB PID (0x4001-0x4022, usbtest keeps 0x4010) instead of the PID_MAP interface bitmap: different examples now always re-enumerate back-to-back, even on boards whose CPU reset does not drop D+ (WCH CH58x), so the EXAMPLE_PID table and same-PID adjacency reordering in hil_test.py are gone; only the variant-boundary same-example repeat needs a swap. - Report matrix: stable columns with the metric-bearing tests pinned first (usbtest, cdc_msc_throughput, msc_file_explorer[_freertos]), the rest alphabetical. Fail fast: - enum wait budget 8 s on the first attempt, 4 s on retries; dfu waits are deadline-based so dfu-util's own runtime counts against the budget. A device-absent failure now costs ~3-5x a passing test (20-30 s) instead of 10-30x (47-150 s). - CI runs hil_test with --retry 1 and no in-run second pass: a broken fixture fails the job fast instead of holding the self-hosted runner for hours and blocking other PRs' HIL jobs. hil_test still writes the .skip sidecar, so a manual re-run attempt only retests what failed. Review fixes (multi-agent adversarial review of this commit): - tinyusb_win_usbser.inf: the PID rework moved five CDC examples onto even PIDs the INF's odd-only DeviceList never matched (legacy-Windows usbser binding) - appended 0x4006/4008/400a/4020/4022 to both lists. - usbtest example: USBTEST_TIER is now overridable and the descriptors and pumps are tier-conditional, so a board whose DCD cannot serve a tier lowers it instead of skipping the whole example - RA2A1 (RUSB2 with no isochronous pipe) builds at tier 3 via its BOARD_ define; the host battery follows the tier advertised in bcdDevice. Tier-4 output verified byte-identical after the refactor. - dynamic_configuration's second config derived USB_PID + 11 = 0x4018, colliding with net_lwip_webserver - now USB_PID + 0x0100, outside the per-example space. tools/check_example_pids.py (pre-commit hook) enforces PID uniqueness incl. derived and literal idProduct values. - usbtest.py firmware gate: matched by device ID (uPD720201/720202, both use the 0x6c FW register), and an unreadable version (setpci missing/denied) now refuses with its own message instead of masquerading as "firmware 0x00000000"; noted the gate is necessary but not sufficient (board-specific kills stay per-board skips). - hil_test: deadline waits use time.monotonic(); multiprocessing context pinned to fork (raw semaphores in Pool initargs); flash and usbtest permits unified into one fail-closed, exception-safe ctrl_permit (unknown controller takes every slot and logs a warning instead of silently borrowing slot 0); an all-skipped battery reports as skip, not "0/0" failure; slow-body polls (mtp, printer, disk read) go through a shared deadline-based wait_until so their bodies count against the enum budget; throughput's FS detection compares serials case-insensitively like every other walk; a missing MSC read-speed line now fails the host msc_file_explorer test instead of passing with an empty metric. Hardening: - fail fast (15 s) when a driver-registry sysfs write blocks: a wedged device otherwise turns every subsequent battery into an unkillable D-state writer and silently hangs the whole run - usb-recover skill: a VM reboot is not a reliable cure (MosChip hubs latch up across the PCIe reset); full host power cycle is Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
2026-07-13Fix max-effort review findings in lock protocol, workflows, and docshathach
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 <[email protected]> Claude-Session: https://claude.ai/code/session_01Upj4hta5TNoAbidqeC1zZ6
2026-07-10Fix review findings and add static-analyzer agenthathach
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 <[email protected]> Claude-Session: https://claude.ai/code/session_01Rn1AN5DsTdFhRwhugfgKZi
2026-07-09skills: usbtest/usb-debug/usb-recover docs, hil runner noteshathach
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
2026-07-09feat: Claude Code multi-agent dev/test harness for TinyUSBhathach
Add worker agents (builder, port-dev, driver-reviewer, hil-operator, pr-monitor), deterministic workflows (validate, fanout-dev, driver-review, hil-validate, full-check, pr-babysit) and a /pre-pr gate skill, so sessions can fan build/test/review/PR-triage work out to tiered subagents. pr-babysit drives a PR to green: triage CI + bot reviews, fix validated findings, verify, push, and reply-to + resolve each inline review thread (fixed or refuted). Replace the stop-the-runner HIL discipline with per-board flock locks: test/hil/board_lock.py plus a fail-open guard in hil_test.py let CI and dev sessions share the rig per board (locked boards fail fast and re-run; HIL_NO_BOARD_LOCK=1 is a user-authorized bypass). The actions-runner is never stopped. Design spec, implementation plan, and real-rig smoke evidence under docs/superpowers/. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Rn1AN5DsTdFhRwhugfgKZi
2026-06-30docs: convert changelog release notes from RST to Markdown (#3746)0.21.0Ha Thach
* docs: convert changelog release notes from RST to Markdown
2026-06-30make-release skill: tighten to commands + essential judgmenthathach
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-30docs: move changelog to docs/changelog, drop the docs/info folderhathach
Relocate docs/info/changelog/ -> docs/changelog/ (docs/info held only the changelog) and update all references: the toctree, README + MAINTAINERS links, make_release.py, and the make-release skill. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-30build.py: prefer pico/pico2 for rp2040 CI; skill: drop one-time 0.20.0 ↵hathach
backfill note - ci_preferred_boards: rp2040 -> raspberry_pi_pico, raspberry_pi_pico2 so the one-board CI/metrics build uses a Pico (the first-alphabetical board failed). - make-release skill: the metrics backfill was a one-time 0.20.0 task, not a recurring release step; keep only the CI auto-compare note. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-30make-release skill: document code-size compare vs previous releasehathach
CI auto-uploads metrics.json + a compare to each release on the release event (needs the previous release's metrics.json); plus the procedure to backfill a missing baseline by building the old tag's own tree and post-processing its linker maps (current tooling can't build old source — co-evolved tree). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-30Fix code-review findings (changelog rendering, release skill, sidebar)hathach
- changelog: fix 3 silent RST mis-renders carried over from the old monolith — Markdown link in 0.7.0, mismatched/single backticks in 0.18.0 / 0.20.0 - make-release skill contributors one-liner: parallelize the gh fetch, anchor the bot filter (was a substring that dropped handles like "abbott"), and join with ", " (paste -sd cycles the delimiter -> "@a,@b @c"); finalize now stages only the reviewed set (git add -A -- ':!.idea'); drop the obsolete CRLF gotcha - make_release.py: emit LF not CRLF in the repository.yml insertion (fixes the gotcha at the source) - docs sidebar: drop the hardcoded furo component list; override brand.html to include furo's own template + the sponsor button (decoupled from furo internals, no upper-bound pin needed); move sponsor styles into custom.css - .pre-commit-config.yaml: drop stale end-of-file-fixer excludes for the deleted contributors/CoC include shims Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-30Address Codex review: release skill + furo requirementhathach
- make-release skill: stage new files with git add -A in finalize, use unprefixed release tags (X.Y.Z), and run validate build steps in subshells so the cwd doesn't leak between commands - docs/requirements.txt: require furo>=2025.12.19 so the sidebar component list in conf.py (incl. variant-selector.html) is always available Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-30Address Copilot review; move release process into the make-release skillhathach
- README: restore the separate CH32V103 / CH583,CH582 rows in the Supported CPUs table — the merged row wrongly applied "ISO data loss [2]" to CH583/2 - Fix typos in historical changelog entries (santiy, Venndor, dynamnic, bagde, masstorage, techinical, walkaround, "Update Update") flagged by Copilot - Replace the AGENTS.md Release section with a pointer to the make-release skill; add a Finalize step (maintainer commit/tag/push + GitHub release) to the skill so nothing is lost Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-29Bump version to 0.21.0; rework changelog, contributors, and docshathach
Release: - Bump version to 0.21.0 and regenerate tusb_option.h, library.json, repository.yml, sonar-project.properties, boards.rst, dependencies.rst - Add 0.21.0 release notes and split the changelog into per-release files under docs/info/changelog/ (date out of title, driver/class groups as sub-headings, DCD & HCD section after Device/Host stacks) Contributors: - Credit each release's PR authors in a Contributors section - Drop the curated contributors page; add MAINTAINERS.rst Docs: - Update Code of Conduct to Contributor Covenant 3.0 (keep it in the repo, remove it from the built docs) - Sidebar: add a home entry, rename the group to "Documentation", move Changelog into it, add a GitHub Sponsor button, merge external links, rename FAQ; hide the inline toctree on the landing page - Add the make-release skill and update the AGENTS.md release process Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-29docs: address Copilot review on the example READMEshathach
- Order CFG_TUH_DEVICE_MAX before CFG_TUH_HID in the host config snippets (cdc_msc_hid, hid_controller) so the documented snippet has no forward macro reference when copied into tusb_config.h. - Fix stale `examples.rst` references: the generator now writes per-group `docs/examples/<group>/index.rst` pages, so update the conf.py comment and the build-doc SKILL.md accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-29docs: add build-doc tooling and a README for every examplehathach
Documentation tooling: - Add the `build-doc` skill and `tools/build_doc.py` wrapper for local Sphinx builds (clean / -W / open). - Enable Markdown (MyST) in conf.py and auto-collect examples/{device,host,dual}/*/README.md into a 3-level Examples nav (Examples > Device/Host/Dual > example), noting each page's source location and normalizing headings to a single H1. - Remove the stale `.claude/commands/build-doc.md`; point the AGENTS.md Documentation section at the skill. Example docs: - Add a README.md for every device/host/dual example: what it does, USB interface table, notable tusb_config.h settings, generic CMake + Make build steps, and how to try it. - Fold each *_freertos variant into its base README, noting the FreeRTOS source path and any RTOS-specific behavior. Generated docs/examples/ output is git-ignored. Builds clean with `sphinx-build -W`. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-24docs: add usbmon skill for capturing/debugging USB bus traffichathach
Adds a Claude Code skill that wraps usbmon + tshark to capture host-side URBs into a Wireshark pcapng and decode them, for debugging TinyUSB device enumeration/transfer issues on real Linux hardware. Includes a usbcap.sh capture helper (bus / VID:PID / auto) plus filter, errno, and symptom->check reference tables. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-11pvs skill: harden credentials parsing; note compile DB is exported by defaultClaude
- Parse PVS_STUDIO_CREDENTIALS into two quoted fields (no glob/word-split). - AGENTS.md: examples build sets CMAKE_EXPORT_COMPILE_COMMANDS ON already. Addresses Copilot review on #3695.
2026-06-11pvs skill: mirror CI --security-related-issues flag and ignore SARIF outputClaude
- Add --security-related-issues to run_pvs.sh and AGENTS.md analyze commands so local runs reproduce the CI SAST classification (static_analysis.yml). - Ignore *.sarif so a successful run leaves the worktree clean. Addresses Codex review on #3695.
2026-06-05Compact pvs skill; fix PVS-Studio -S/--dump-files docs in AGENTS.mdClaude
The AGENTS.md '-S src/foo.c' example was inaccurate: -S takes a plaintext file listing source paths, not paths directly. Drop --dump-files from the documented commands (it scatters .PVS-Studio.i/.cfg dumps across the tree; FP-debugging only) and reference the new pvs skill. https://claude.ai/code/session_015inWmFhRYSq17CxMukdoqX
2026-06-05Add pvs skill to run PVS-Studio analysis for a boardClaude
Bundle a run_pvs.sh helper (takes BOARD as its first argument) that follows the PVS-Studio static-analysis flow from AGENTS.md: build all examples with an exported compile_commands.json, run pvs-studio-analyzer against .PVS-Studio/.pvsconfig, then emit errorfile + SARIF reports. https://claude.ai/code/session_015inWmFhRYSq17CxMukdoqX
2026-06-02ci: address second codex/copilot review roundhathach
- claude.yml: drop the issues "assigned" trigger; its author_association gate keys on the issue author, not the assigner, so a maintainer assigning an outside contributor's issue would be wrongly skipped. - claude-code-review.yml: issues: read -> write so use_sticky_comment can create/update its PR comment via the issues API. - hil SKILL.md: make local/remote command blocks copy-pasteable (drop [-b BOARD_NAME] notation for concrete examples) and fix timeout (600000 ms is 10 min; use 1200000 ms for the stated 20 min). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-02ci: address codex/copilot review on claude workflowshathach
- claude.yml: gate @claude on author_association (OWNER/MEMBER/COLLABORATOR) so the write-scoped token and OAuth secret are never issued for an untrusted commenter on this public repo (defense-in-depth). - claude-code-review.yml: skip fork PRs in the job condition (head.repo.full_name == github.repository) since forks get no secrets and would only fail noisily; fix the misleading token comment; pass additional_permissions: actions: read so actions: read is effective. - hil SKILL.md: reword hostname guidance, use full test/hil/* paths, and show an explicit CONFIG= assignment so the local command is runnable. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-01docs(hil): support running HIL locally on ci.lanhathach
Update the hil skill so config selection is per-host: run `hostname` first, then htpc uses local.json and ci uses tinyusb.json. ci can now run HIL on its own large board pool locally instead of only via SSH from htpc. Remote (SSH) mode is htpc-only since ci cannot reach htpc. Also compact the skill for brevity.
2026-04-29metrics_compare_base: catch TimeoutExpired; fix code-size skill docshathach
- run() now catches subprocess.TimeoutExpired (only triggered by `cmake --build`'s timeout=600) and returns CompletedProcess(rc=124) so the caller falls through to error reporting and worktree cleanup instead of crashing with a traceback. - code-size SKILL.md: document the actual default filter (per-side absolute <checkout>/src/ path, not the old `tinyusb/src` substring) and adjust the reporting guidance to match what the report rows actually contain. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-04-29Improve remote execution in `hil_ci.sh`hathach
2026-04-29Add `code-size` skill and integrate `metrics_compare_base.py` toolhathach
- Introduced a `code-size` skill under `.claude/skills` for evaluating TinyUSB code size changes between the base branch and current branch. - Added `metrics_compare_base.py`, automating code size comparison with granular options for examples, boards, and CI-wide runs. - Updated `AGENTS.md` to include quick references and usage guidance for the new feature.
2026-04-29address review feedback for AGENTS.md and hil skillhathach
AGENTS.md: - fix build dir to cmake-build-<board> (matches hil_test.py expectation) - reformat flash section to avoid shell-pipe ambiguity, use <board> - mention board.mk for Make-based builds - complete OpenOCD jlink interface example - update stale "Build Option 2" references to "All examples for a board" - split PVS-Studio command so it is copy-pasteable .claude/skills/hil/SKILL.md: - clarify local.json is user-supplied, not tracked in repo - use python3 consistently - add all-boards variant for remote execution - delegate remote execution to test/hil/hil_ci.sh test/hil/hil_ci.sh: - portable shebang (/usr/bin/env bash) - set -euo pipefail - env overrides for REMOTE, REMOTE_DIR, CONFIG, ROOT_DIR - --prune-empty-dirs on rsync to skip empty subdirs - fail-fast sanity check on repo layout Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-04-28update AGENTS.md and claude hil skillhathach
2026-04-04make board_uart_read()/write() return -1 when unimplemented for consistency ↵hathach
across all families
2026-04-03add script and instruction to run remote hil on local ci serverhathach
2026-04-01reduce code size, use state to replace active + pendinghathach