Skip to content

Add CLAUDE.md with development guidance for AI coding agents - #324

Merged
tancheng merged 4 commits into
masterfrom
add-claude-md
Jul 19, 2026
Merged

Add CLAUDE.md with development guidance for AI coding agents#324
tancheng merged 4 commits into
masterfrom
add-claude-md

Conversation

@tancheng

Copy link
Copy Markdown
Owner

Summary

Adds a CLAUDE.md at the repo root — the standard file Claude Code (and other AI coding agents) read at session start to learn how a repository works.

The content is distilled from the practical lessons of recent development sessions (PRs #320 and #322), prioritizing knowledge that is not discoverable by reading a file or two:

  • Environment: the custom pymtl3.1@yo-struct-list-fix fork requirement, submodules, verilator/pkg-config, and how to recognize the local verilator-version import failure as a toolchain issue rather than a code bug.
  • Testing: that the default pytest run does not exercise Verilog translation (--test-verilog does), pytest.ini's hidden tracebacks, which test tiers take seconds vs. ~20 minutes, and that assert N < N failures mean a kernel deadlocked.
  • RTLIR constraints: no in/not in on hardware values, no tuple free variables, silent no-op bit-slice <<= in @update_ff (use set/clear masks), and the constant-wire pattern that works instead.
  • Architecture: the ctrl-step protocol (ctrl_proceed, per-consumer done-latching), val/rdy conventions including FUs that snoop operands without handshakes, the comb-loop hazard through FU recv_in.rdysend_out.rdy, register-cluster armed/token semantics, the three tile variants that must stay in sync, and how kernels are encoded in tests.

Docs-only change; no RTL or test modifications.

Captures the non-obvious knowledge needed to work productively in this
repo: the custom pymtl3 fork setup, how to actually exercise Verilog
translation in tests (--test-verilog), RTLIR translator constraints,
the ctrl-step protocol and val/rdy conventions (including FUs that
snoop operands without handshakes), register-cluster token semantics,
test-suite timing expectations, and how to distinguish local toolchain
issues from real failures.
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
tancheng added 2 commits July 18, 2026 09:22
Per review: the content moves to AGENTS.md (the convention Codex and
other agents read) with a tool-neutral header; CLAUDE.md becomes an
@AGENTS.md import so Claude Code loads the same single source of truth.
Also documents the naming conventions observed in the codebase:
CamelCase classes/type names, snake_case functions and variables,
UPPER_SNAKE_CASE constants, and the kCamelCase attribute keys.
@tancheng
tancheng merged commit f44c97a into master Jul 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants