OpenBoot
Draft: this page is not reviewed yet.

AI-assisted contributionsDraft

Contributions written with the help of AI coding tools are welcome. Much of this project was built that way. The condition is responsibility: a person understands the change, has checked it, and answers for it.

This page is the policy for people. The instructions the tools themselves read are in the file AGENTS.md in the repository root; CLAUDE.md imports it, and other tools read AGENTS.md directly.

The short version#

  • You may use any tool to write code, tests and documentation.
  • You must understand every line you send and be able to explain it in review, without the tool.
  • You review the output before you send it. A maintainer is not the first human reader of your pull request.
  • You sign off the commit. The tool does not.
  • You say in the pull request when AI assistance was significant.

Why this project is strict about it#

OpenBoot is firmware and kernel drivers. A mistake here is not a wrong pixel on a web page. Code in the boot path, at EL2, in the storage path or in a driver can corrupt data on the internal disk, or leave a Mac in a state that needs a restore from a second computer. A tool can produce code that looks correct, compiles and passes host tests, and is still wrong on the machine, because the tool does not know how the hardware behaves and will fill the gap with a plausible value.

Where to start#

If you have no programming or low-level background, do not start with the core boot code, the EL2 supervisor, the NVMe path, the GPU or any driver, even if a tool offers to write it for you. You cannot review what you do not understand, and nobody can test it for you.

Good first contributions, with or without a tool:

  • Documentation: fixes, clearer wording, missing steps you hit yourself.
  • Bug reports with good logs: what you ran, the exact build, the full console output.
  • Hardware reports: a sanitised device-tree dump of your Mac and the output of the analysis tool. See Adding a device and Analysis mode.
  • Testing: run the host tests on your system, or a documented hardware run on a supported machine, and report the result.
  • Host tests for pure logic that has none yet.

The open tasks are on Help wanted.

Rules#

Understand, review, explain#

Read the whole diff before you open a pull request. Remove what you cannot explain. If a reviewer asks why a line is there, "the tool wrote it" is not an answer. Check every hardware value in the change against the code, a device descriptor or an observation; tools invent register addresses and constants that look right. See the Hardware facts policy.

Test, and say what was not tested#

Run the host tests for what you changed; the commands are on Host tests. A change that touches hardware must be run on real hardware, or the pull request must say clearly that it was not: write "not tested on hardware" in the description. Untested hardware-facing changes may be accepted for review but are not merged as working. A green host suite is never a hardware result.

Do not run a tool with access to a debug link, a flashing tool or an installer on a machine whose data you cannot lose. The tool must not flash, install or reboot anything without your explicit decision for that step.

Keep private and vendor material out of prompts and pull requests#

  • No secrets: keys, certificates, tokens, passwords. Not in the tree, and not in a prompt.
  • No vendor code, firmware or binaries, neither pasted into a prompt nor into a pull request. Do not ask a tool to translate or rewrite vendor code. Output derived from such input does not belong in this project.
  • No raw device-tree dumps, serial numbers, home-directory paths, host names or network addresses. Sanitise dumps with tools/adtsan and read the result before you share it.

One focused change#

One logical change per pull request, small enough to review. A tool makes large diffs cheap to produce; they are not cheap to review. Unrelated refactoring, reformatting and renames are removed before sending.

Sign-off and disclosure#

Every commit carries Signed-off-by: (see Contributing). The sign-off is made by a person, who certifies the Developer Certificate of Origin and takes responsibility for the change, including the parts a tool wrote. Check that the output is yours to submit under the licence of the file.

Disclose significant AI assistance in the pull request description, in one line: for example "written with an AI assistant, reviewed and tested by me". Small completions need no note. Do not add attribution trailers for a tool to commits (no Co-Authored-By: for a tool, no "Generated with" line): the commit history names the people who answer for the code.

What stays out of the tree#

A tool's private workspace is not part of the repository: session logs, plans, scratch and hand-off notes, tool settings with local paths. The shared instruction files (AGENTS.md, CLAUDE.md) are the exception; they are project files and changes to them are reviewed like code.

What maintainers may do#

Maintainers may close a pull request without a detailed review when it is low-effort generated output: the author cannot explain it, it was plainly not read or not built, it ignores the rules on this page, or it is a large unfocused diff. This is not a judgement of the tool or of the person. You are welcome to come back with a smaller change that you have read and tested.

Maintainers may also ask how a change was tested and on which machine, and may ask for a hardware result before merging a change that touches hardware.