IHP-Open-PDK
AGENTS.md904 starsChanged 5 months agoApache-2.0View on GitHub
This file is read by Claude Code (via CLAUDE.md), Gemini CLI (via GEMINI.md) and other agents that support AGENTS.md. Review-time guidance for GitHub Copilot is in .github/copilot-instructions.md. The rules for this repository are in CONTRIBUTING.md. Follow them; this file only adds what an agent needs while editing. - Identify which PDK a path belongs to (ihp-sg13g2, ihp-sg13cmos5l) or whether it is shared (ihp-common). Section "Repository structure and multi-PDK rules" in CONTRIBUTING.md decides where a file may go. - Many paths…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 32,671 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Follow them; this file only adds what an agent needs while editing.
- Very specific: line 18
Do not create new symlinks between PDK directories.
- Distinctive: line 60
Follow section "Commit messages" in CONTRIBUTING.md: path-prefixed title, body that explains the problem.
- Very specific: line 62
Use only the trailers listed in section "Trailers" of CONTRIBUTING.md (Fixes #123, Related to #123, Signed-off-by:), plus one for the agent:
- Distinctive: line 70
No other trailers or footers: no session or generation tags, no "Generated with ..." footer, no links to the agent or its vendor.
- Very specific: line 78
Add a CHANGELOG.md entry, naming the PDK, for user-visible changes.
≈ “Common” is an estimate: at least 1 in 5 of the 41,581 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Instructions for AI coding agents
This file is read by Claude Code (via CLAUDE.md), Gemini CLI (via
GEMINI.md) and other agents that support AGENTS.md. Review-time
guidance for GitHub Copilot is in .github/copilot-instructions.md.
The rules for this repository are in CONTRIBUTING.md. Follow them; this file only adds what an agent needs while editing.
Before you change anything
- Identify which PDK a path belongs to (
ihp-sg13g2,ihp-sg13cmos5l) or whether it is shared (ihp-common). Section "Repository structure and multi-PDK rules" in CONTRIBUTING.md decides where a file may go. - Many paths under
ihp-sg13cmos5lare symlinks intoihp-sg13g2. Runreadlink -f <path>before editing: a change to the link target changes both PDKs. Say so in the commit message and test both. - Do not create new symlinks between PDK directories. Shared content goes
to
ihp-common. - Files under
libs.ref/**(GDS, CDL, LEF, LIB, Verilog) and device models underlibs.tech/*/modelsare foundry data. Do not edit their values; only move or rename them when a rule requires it. versions.txtpins the tool versions for the whole repository. Do not change it as a side effect of another change.- Submodules (
.gitmodules) are bumped in their own commit. Do not include a changed submodule pointer in an unrelated commit.
Building and testing
There is exactly one Makefile, in the repository root; run make from
there. Targets act on $(PDK), default ihp-sg13g2:
make help PDK=ihp-sg13cmos5l # what the PDK offers
make env # Python venv in ./actions_venv
make lint PDK=ihp-sg13g2 # flake8 on the DRC/LVS scripts
make test-DRC-main PDK=ihp-sg13g2
make test-LVS-main PDK=ihp-sg13cmos5lShared targets: lint, test-DRC-main, test-DRC-cells,
test-LVS-main, test-LVS-cells, test-LVS-switch, test-SRAM. A
target a PDK does not carry prints a notice and succeeds; check the
output, a green run may have run nothing. PDK-specific targets are in
Makefile.<pdk>.
CI additionally rejects broken symlinks anywhere in the repository and non-ASCII characters in the KLayout PCell libraries.
Writing code
- New source files carry the Apache-2.0 header used throughout the repository (copy it from a neighbouring file, keep the comment style of that file type).
- Python: flake8 with
max-line-length = 120(see.flake8). ASCII only inlibs.tech/klayout/python/**. - Match the conventions of the directory you are in; the tool directories
under
libs.techdiffer from each other on purpose.
Committing
- Follow section "Commit messages" in CONTRIBUTING.md: path-prefixed title, body that explains the problem.
- Use only the trailers listed in section "Trailers" of CONTRIBUTING.md
(
Fixes #123,Related to #123,Signed-off-by:), plus one for the agent:Co-Authored-By: <model name> <noreply@...>for the model that helped, optional;Signed-off-by: <name> <e-mail>of the human contributor (git commit -s) is mandatory and always the last line. It is the contributor's DCO statement and belongs to a person, never to a tool.
- No other trailers or footers: no session or generation tags, no "Generated with ..." footer, no links to the agent or its vendor.
- Pull request descriptions need no trailers. They follow the same
restriction: no session or generation tags, no "Generated with ..."
footer, no links to the agent or its vendor;
Fixes #123orRelated to #123are allowed. - One logical change per commit; never merge the target branch into a feature branch.
- Add a
CHANGELOG.mdentry, naming the PDK, for user-visible changes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

