Skip to content

Commit 340c8c1

Browse files
Improve AGENTS.md monorepo and PR-authoring guidance (#1265)
* Document monorepo workflow and safe gh PR body handling * Reorganize AGENTS guidance for monorepo and PR body safety
1 parent 9e40b17 commit 340c8c1

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

AGENTS.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
This is a working guide for contributors and coding agents in this repository.
66
It captures practical rules that prevent avoidable CI and PR churn.
77

8+
## Repository Layout
9+
10+
- This repository is an npm workspaces monorepo.
11+
- root package: `testcontainers-monorepo`
12+
- workspaces: `packages/testcontainers` and `packages/modules/*`
13+
- shared lockfile: root `package-lock.json` (workspace installs update this single file)
14+
- For workspace-scoped dependency changes, prefer targeted commands to reduce lockfile churn:
15+
- `npm install -w @testcontainers/<module>`
16+
- `npm uninstall -w @testcontainers/<module> <package>`
17+
818
## Development Expectations
919

1020
- If a public API changes, update the relevant docs in the same PR.
@@ -21,7 +31,7 @@ It captures practical rules that prevent avoidable CI and PR churn.
2131
## Permission and Escalation
2232

2333
- `npm install` requires escalated permissions for outbound network access to npm registries.
24-
- `npm test` commands should b`e run with escalation so tests can access the Docker socket.
34+
- `npm test` commands should be run with escalation so tests can access the Docker socket.
2535

2636
### Escalation hygiene
2737

@@ -41,6 +51,8 @@ It captures practical rules that prevent avoidable CI and PR churn.
4151
- If signing fails (for example, passphrase/key issues), stop and ask the user to resolve signing, then retry.
4252
8. Push branch. Ask for explicit user permission before any force push.
4353
9. Open PR against `main` using a human-readable title (no `feat(...)` / `fix(...)` prefixes).
54+
- When using `gh` to create/edit PR descriptions, prefer `--body-file <path>` over inline `--body`.
55+
- This avoids shell command substitution issues when the body contains backticks.
4456
10. Add labels for both change type and semantic version impact.
4557
11. Ensure PR body includes:
4658
- summary of changes
@@ -73,6 +85,6 @@ It captures practical rules that prevent avoidable CI and PR churn.
7385
- docs-only change: `documentation` + usually `patch`
7486
- dependency update: `dependencies` + impact label based on user-facing effect
7587

76-
## Practical Note
88+
## Lockfile Hygiene
7789

7890
- Recheck `package-lock.json` after `npm install` for unrelated drift and revert unrelated changes.

0 commit comments

Comments
 (0)