Skip to content

Commit 6a033b1

Browse files
Manushpm8claude
andauthored
Tell an agent what the README cannot (#9)
* Tell an agent what the README cannot The README has the setup, the commands, the lint and the snapshot rule. What it does not have is the handful of things that look like ordinary edits and are not, every one of which has been got wrong here at least once: the three strings that are wire values rather than package names, including a literal that is hashed into every graph fingerprint; the two suites that cannot be collected together; that a **Verified** block in skills/ is a claim an endpoint produced exactly those bytes; which files are generated; and that the hygiene gate fails on prose naming internal infrastructure. AGENTS.md is the file, since that is what reads across tools. CLAUDE.md points at it rather than duplicating it, and is a file rather than a symlink so a checkout without symlink support still reads something. This file is written around the hygiene patterns rather than added to the allowlist, which is the same discipline it asks for. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Manush Murali <manushm@nvidia.com> * Three claims Codex checked and I had not mermaid_notices writes the two LICENSE files, the root one and the engine's, and never touches NOTICE. It renders MERMAID_COMPONENTS.json, which --refresh is what regenerates. The fragment rule was stated as "reads a name no earlier example binds", which is true of every self-contained example too. An example is complete when every name it reads was bound by itself or by an earlier complete one. Two more generated trees were missing: the relbench registry, which pins source commits and table digests, and the ANTLR output beside PQLGrammar.g4. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Manush Murali <manushm@nvidia.com> * The grammar directory holds two hand-written files README.md and __init__.py are not ANTLR output, and "everything beside it is produced" would have had an agent regenerate over them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Manush Murali <manushm@nvidia.com> --------- Signed-off-by: Manush Murali <manushm@nvidia.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 61ef17a commit 6a033b1

2 files changed

Lines changed: 85 additions & 0 deletions

File tree

‎AGENTS.md‎

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Working in this repository
2+
3+
Read [`README.md`](README.md) first: it has the development setup, the test
4+
commands, lint, type-checking and the snapshot rule. This file is only what is
5+
easy to get wrong here, and most of it has been got wrong at least once.
6+
7+
## What you install is not what you import
8+
9+
| Distribution | Module |
10+
|---|---|
11+
| `structured-data-models-client` | `sdm_client` |
12+
| `structured-data-models-api` | `sdm_api` |
13+
| `structured-data-models-pql` | `predictive_query` |
14+
| `structured-data-models-connectors` | `sdm_connectors` |
15+
| `structured-data-models-relational-engine` | `sdm_relational_engine` |
16+
17+
Package directories under `packages/` carry the distribution name. Nothing
18+
derives one name from the other: read the import root off `src/`.
19+
20+
## Strings that look like names and are not
21+
22+
A rename that sweeps the tree will change these, and nothing will fail:
23+
24+
- `DATABRICKS_PRODUCT`, kept twice because the connectors never import the
25+
client: `sdm_client/core/databricks_user_agent.py` and
26+
`sdm_connectors/_databricks_partner.py`, held to the same value by a test.
27+
`SAMPLING_QUERY_TAG` sits beside the second. They are what a warehouse sees,
28+
so changing them splits Databricks partner telemetry and query history at
29+
that version.
30+
- `_term('sdm-relational-engine')` in `rfm/graph_fingerprint.py`. It is hashed.
31+
Changing it gives identical graphs different names, which the module says
32+
only `FINGERPRINT_VERSION` may do.
33+
34+
## Run the two suites separately
35+
36+
The engine and the other four packages cannot be collected in one pytest run;
37+
together they fail at import. The README gives both commands. Run both.
38+
39+
## skills/ is executable
40+
41+
[`tests/test_skills.py`](tests/test_skills.py) reads the tables out of
42+
`skills/` and puts them to the client, and with `-m live_nim` it runs every
43+
complete example and compares what it printed to the block pasted beneath it.
44+
A `**Verified**` block is a claim that an endpoint produced exactly that. Do
45+
not write one by hand, and do not edit the numbers in one.
46+
47+
An example is complete when every name it reads was bound by itself or by an
48+
earlier complete example. One that is not is a fragment: it is checked as code,
49+
executed nowhere, and may not show output.
50+
51+
## Generated files
52+
53+
Regenerate these; never edit them:
54+
55+
- `packages/structured-data-models-api/src/sdm_api/generated/` -- regenerate
56+
with `scripts/generate_sdm_api.py`, which also writes `PROVENANCE.json`. A
57+
change to the generator itself changes the recorded hash.
58+
- The third-party attribution in the two `LICENSE` files, the root one and the
59+
engine's -- `scripts/mermaid_notices.py --write`, checked with `--check`. It
60+
renders `rfm/assets/MERMAID_COMPONENTS.json`, which `--refresh` regenerates;
61+
neither touches `NOTICE`.
62+
- `rfm/assets/relbench_registry.json` -- `scripts/pin_relbench.py`. It pins
63+
source commits and table digests.
64+
- The ANTLR output in `predictive_query/grammar/`: the `.py`, `.tokens` and
65+
`.interp` files. Edit `PQLGrammar.g4` and regenerate. The `README.md` and
66+
`__init__.py` there are hand-written.
67+
- `tests/golden/` -- the exported surface and the recorded wire payloads.
68+
69+
## Gates that fail on prose
70+
71+
`scripts/check_repo_hygiene.py all` runs in CI. It refuses a shipped file that
72+
names internal infrastructure: the internal git host, a bug tracker id, a
73+
security-program id, the internal wiki, or an internal sibling repository. The
74+
patterns are in that script, and this file is written around them rather than
75+
listed as an exception. A comment citing an internal ticket is a build
76+
failure, not a style note.
77+
78+
Every first-party source file carries an SPDX header.
79+
80+
## Commits
81+
82+
Sign off every commit (`git commit --signoff`); see
83+
[`CONTRIBUTING.md`](CONTRIBUTING.md). A pull request whose commits are not
84+
signed off cannot be merged.

‎CLAUDE.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
See [`AGENTS.md`](AGENTS.md).

0 commit comments

Comments
 (0)