Skip to content

Say how to get an installed tree in AGENTS.md - #392

Open
mokagio wants to merge 3 commits into
trunkfrom
mokagio/agents-md-bootstrap
Open

Say how to get an installed tree in AGENTS.md#392
mokagio wants to merge 3 commits into
trunkfrom
mokagio/agents-md-bootstrap

Conversation

@mokagio

@mokagio mokagio commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Adds a "Bootstrap" section to AGENTS.md with instruction on how to set up a new checkout.

AI-generated details

Why

AGENTS.md tells an agent how to review, how to write Markdown here and how to run one test file, but never how to get an installed tree to run any of it in. Those steps existed only in README.md, written for a human building from source, and in CONTRIBUTING.md, written to explain what CI does — neither is where an agent looks first, and neither says which parts are traps.

This came up while working on another branch: an agent following AGENTS.md had no documented install step and had to infer one from the workflow files.

What changes

A Bootstrap section above Commands, holding only what a reader cannot deduce from package.json: what the root postinstall actually produces, why --ignore-scripts is the wrong shortcut even though the lint workflow uses it, when the Electron binary is really downloaded, and that docs/ is a separate package with its own lockfile. It points at CONTRIBUTING.md for the docs workflow rather than restating it.

One thing the second commit corrects rather than adds. The workflow comments say postinstall pulls the Electron binary. Running a clean npm ci and looking shows it does not: electron ships no install script, node_modules/electron/dist/ is absent when the install finishes, and it appears the first time something requires electron. So a finished install still has a download in front of the first npm start or E2E run, which is worth knowing when a first run seems to hang.

How to test this

Platforms: any — this is documentation, and the claims in it were checked on macOS.

Starting state: a clean checkout of this branch with no node_modules.

  1. npm ci at the root. It should exit 0, warn about the packages allowScripts does not cover, and leave src/renderer/index.js and src/renderer/index.css on disk.
  2. ls node_modules/electron/dist — should not exist yet.
  3. node -e "console.log(require('electron'))" — prints Downloading Electron binary..., then a path under node_modules/electron/dist/.

What must not have happened: none of the section's claims should hold only on one machine. If step 2 finds a dist/ directory already there, the paragraph about the lazy download is wrong for that setup and should be fixed rather than left to mislead.

Risks and limitations

Documentation only; no code path changes. The three steps above were run on macOS with Node 24.19.0 against .nvmrc's 24.18.0 — close but not identical, so a Windows or exact-version run confirming the same behaviour would be worth having before treating it as settled.

Related

Follow-up to work on #391.

mokagio and others added 2 commits August 21, 2026 11:52
An agent arriving here could find the review standard, the Markdown
convention and how to run one test file, but nothing about installing —
that lived only in `README.md`, written for a human building from source,
and in `CONTRIBUTING.md`, written to explain what CI does.

The warning against `--ignore-scripts` is the part worth stating rather
than leaving to be discovered: `postinstall` is what fetches the Electron
binary, rebuilds the native file-locking module against its ABI, and
generates the renderer bundle, none of which are in the tree already.
The lint workflow installs that way on purpose so it never executes a
pull request's code, which makes it easy to copy for the wrong reason.

---

Generated with the help of Claude Code, https://code.claude.com

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Written from the workflow comments, which say `postinstall` pulls the
Electron binary. Running a clean `npm ci` and looking says otherwise:
`electron` ships no install script, `node_modules/electron/dist/` is
absent when the install finishes, and it appears the moment something
first requires `electron`.

That difference is the reason to write it down. An install that looks
complete still has a download in front of the first run, which is not
what "postinstall fetches it" leads anyone to expect.

---

Generated with the help of Claude Code, https://code.claude.com

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings August 21, 2026 01:54
@mokagio mokagio self-assigned this Aug 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds bootstrap guidance so agents can install a usable development tree without inferring steps from workflows.

Changes:

  • Documents root installation, postinstall behavior, and Electron’s lazy download.
  • Clarifies install-script warnings and the separate docs package.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread AGENTS.md
Co-authored-by: Gio Lodi <giovanni.lodi42@gmail.com>
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