AGENTS.md
pnpr/AGENTS.mdAGENTS.md
Quality
94/100
Scores the file, not the repository.Length
609 words
9 headings · 2 code blocksRepository
36k
— · pushed 0 days agoLast changed
2 days ago
First indexed 2 days ago.1# AGENTS.md (pnpr)23Guidance for AI coding agents working in `pnpr/`.45**Read [`../AGENTS.md`](../AGENTS.md) first.** It covers the monorepo-wide6conventions: GitHub PR workflow, signing agent-authored content, conventional7commit messages, code-reuse philosophy, and "never ignore test failures."89## What this project is1011`pnpr/` is a pnpm-compatible npm registry server written in Rust —12roughly the role [verdaccio](https://verdaccio.org/) plays in the JS13ecosystem. It is a **sibling** of `pnpm/`, not part of it.1415The two Rust projects share the same Cargo workspace at the repo root so16that the registry can depend directly on `pacquet-*` crates (tarball17handling, integrity hashes, manifest parsing, network plumbing, etc.) and18the `Cargo.lock` stays unified.1920## Relationship to pacquet2122- **`pnpm/`** is a *port* of the pnpm CLI. Its cardinal rule is23 "match pnpm exactly" — see [`../pnpm/AGENTS.md`](../pnpm/AGENTS.md).24- **`pnpr/`** has no pnpm-CLI counterpart to mirror. It is a new25 server. Behavior here is designed, not ported.2627That means the "match upstream pnpm" discipline that governs `pnpm/`28does **not** apply here. The registry can pick its own architecture,29flags, and config format. It must still be compatible with the npm30registry protocol that pnpm (and npm, yarn, etc.) clients speak.3132## Layout3334Mirrors `pnpm/`:3536```text37pnpr/38 AGENTS.md39 crates/40 pnpr/ -> package "pnpr"41 Cargo.toml42 README.md43 src/44 lib.rs -> library API45 main.rs -> binary entry point (ships the `pnpr` binary)46 # future sibling crates land here, see "New registry-only crates" below47```4849The Rust workspace itself, `rust-toolchain.toml`, `justfile`, and50`Cargo.lock` live at the **repo root** — run `cargo` and `just` from there.51`pnpr/crates/*` is wired into the root workspace `members`.5253## Code reuse5455**Prefer existing `pacquet-*` crates over writing new code.** Before56implementing anything non-trivial, check whether `pacquet-*` already57solves it. Candidates worth checking first: `pacquet-tarball`,58`pacquet-crypto-hash`, `pacquet-crypto-shasums-file`,59`pacquet-package-manifest`, `pacquet-network`, `pacquet-registry`,60`pacquet-fs`, `pacquet-diagnostics`. Add a `pacquet-*` crate the same61way pacquet crates do: declare it in the root `[workspace.dependencies]`62(already done for the pacquet crates) and use `{ workspace = true }`63in this crate's `Cargo.toml`.6465If a piece of code currently inside `pnpm/` turns out to be genuinely66shared between the two stacks and the `pacquet-` prefix becomes67misleading, propose renaming/relocating it in a dedicated PR — not as a68drive-by during feature work.6970### New registry-only crates7172When the registry needs its own crate (logic that isn't shared with the73pnpm port and doesn't fit in `pnpm/`), put it under74`pnpr/crates/<short-name>/` and name the package75`pnpr-<short-name>` in its `Cargo.toml`. The76`pnpr/crates/*` glob in the root workspace `members` picks it up77automatically; just add the new crate to `[workspace.dependencies]` at78the root with the `pnpr-` prefix so other crates can use79`{ workspace = true }`.8081Use the `pnpr-` prefix exclusively for registry-only crates.82Don't reach for `pacquet-` to name something new on the registry side.8384## Dependencies8586Same rule as pacquet: a dependency that is already declared in87`[workspace.dependencies]` may be used by any crate that needs it.88Adding a new third-party crate to the workspace requires an explicit89human request (see [`../pnpm/AGENTS.md`](../pnpm/AGENTS.md#things-not-to-do)).9091## Style, tests, commits9293Follow the pacquet code-style guide94([`../pnpm/CODE_STYLE_GUIDE.md`](../pnpm/CODE_STYLE_GUIDE.md)) and the95pacquet contributing guide ([`../pnpm/CONTRIBUTING.md`](../pnpm/CONTRIBUTING.md))96for Rust-level conventions — imports, naming, ownership, error handling,97test layout. They are written for pacquet but apply to any Rust code in98this workspace.99100### Comments101102Follow the repo-wide comment baseline in [`../AGENTS.md`](../AGENTS.md#comments) and the Rust-specific additions in [`../pnpm/AGENTS.md`](../pnpm/AGENTS.md#comments).103104Commit messages use Conventional Commits with `pnpr` as the scope105(`feat(pnpr): ...`, `fix(pnpr): ...`).106107Run the same checks pacquet does before declaring work done:108109```sh110just check # cargo check --locked --workspace --all-targets111just test # cargo nextest run112just lint # cargo clippy --workspace --all-targets -- --deny warnings113just fmt # cargo fmt + taplo format114```115
Also in pnpm/pnpm
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| wpscanteam/wpscanAGENTS.md · 9.7k | AGENTS.md | setupbuildteststyle+6 | 100/100 | 2 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 3 days ago |
