docs(rust): add ADRs for the Rust core (#45205)

* docs(rust): add ADR folder with ADR 000 and ADR 001 scaffold

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(rust): add ADR 000 and ADR 001 on typing requests inside Rust

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(rust): list four ADR sections in ADR 000

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(rust): move ADR process doc from adr_000 to AGENTS.md

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Nate Armstrong <narmstrong@Nates-MacBook-Pro.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
nate-berri 2026-10-08 10:21:56 -07:00 • committed by GitHub
parent 49266e3b17
commit a81f507bca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,38 @@
# ADR 000: Record architecture decisions
Status: Accepted
## Context
Decisions about the Rust core get made in various places, and in synchronous conversations or on whiteboards.
Knowing the context of when and how the decision was made helps greatly to contextualize code for a reader, as well as informing agents about how things should be done.
Especially with the rust core, there are a great many decisions that need to be made in a large solution space, and the reasons for such decisions may not be obvious.
## Decision
We write a short ADR for any decision that is hard to reverse or that a new contributor would reasonably question. Each ADR lives in this folder as `adr_NNN_short_title.md`, numbered in order, and has four sections: Context, Decision, Alternatives Considered, and Consequences. If writing one takes more than a few minutes, it is too long.
ADRs are never edited after they are accepted, apart from the status line. To change course, write a new ADR and mark the old one `Superseded by ADR NNN`.
ADRs should be hand-written as much as possible, with the intention of being
extremely intention-dense. Agents have a habit of making statements stronger
than they otherwise should be, which makes it challenging to interpret
reasoning, which is the entire point of ADRs.
ADR filenames should ideally make it clear what decision was made. Their
contents should explain (briefly) alternatives considered, as well as
consequences of the decision in pro/con format.
## Alternatives Considered
**Not using ADRs**: This would make us able to move a bit faster, but it makes decisionmaking less clear. Additionally, given the lack of other code documentation, there is no living document other than the code.
## Consequences
Benefits:
- Reviewers and future contributors can find reasoning behind a choice easily
Costs:
- A few minutes of thought and writing per significant decision

View file

@ -0,0 +1,15 @@
# ADR 001: Only type requests inside Rust
Status: Accepted
## Context
The python SDK had typed interfaces for requests living in the bridge in Python. However, there were multiple ways for requests to get there, and so the typing is very shallow and ultimately is just a shim placed on top of untyped args and kwargs.
## Decision
For the time being, avoid trying to restrict or type requests and their possible arguments inside python. Just pass the raw object over into rust, and have a translation layer at the boundary which handles it.
## Consequences
Some python interfaces are a lot less clear about what they expect as input. The typing of the rust module is entirely internal to it, and must be inferred from other channels.