You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* CCM-16068 - Migration to PNPM
* CCM-16068 - Removed eslintignore as this is deprecated, eslint ignores are now handled in the eslint config file
* CCM-16068 - Revised AGENTS.md
* CCM-16068 - Update any remaining npm references
Copy file name to clipboardExpand all lines: AGENTS.md
+24-10Lines changed: 24 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,9 @@ Keep anything language or tool-specific in nested `AGENTS.md` files (for example
11
11
12
12
At a glance, the main areas are:
13
13
14
+
-`pnpm-workspace.yaml` - Defines packages, dependency versions, and package installation options.
14
15
-`infrastructure/terraform/` – Terraform components, and shared modules for AWS accounts and environments.
15
-
-`lambdas/` – TypeScript lambda projects (each with their own `package.json`, Jest config, etc.). Root level packages.json defines workspaces and scripts. Tests for the lambda are stored in `lambdas/{name}/src/__test`.
16
+
-`lambdas/` – TypeScript lambda projects (each with their own `package.json`, Jest config, etc.). Root level packages.json defines scripts. Tests for the lambda are stored in `lambdas/{name}/src/__test`.
16
17
-`src/` and `utils/` – Shared code and utilities (for example `utils/logger`).
17
18
-`docs/` – Documentation site, ADRs, RFCS, and other long‑form docs.
18
19
-`.github/workflows/` and `.github/actions/` – GitHub Actions workflows and composite actions.
@@ -21,27 +22,40 @@ At a glance, the main areas are:
21
22
22
23
Agents should look for a nested `AGENTS.md` in or near these areas before making non‑trivial changes.
23
24
25
+
## Root pnpm-workspace.yaml - role and usage
26
+
27
+
The root `pnpm-workspace.yaml` is the manifest for configuring the pnpm tool, and any workspace packages (if added).
28
+
29
+
- Packages: Declares the set of workspace packages (e.g. under `lambdas/`, `utils/`, `tests/`, `scripts/`). Agents should add a new package path here when introducing a new workspace package if the packages entry is present.
30
+
- Catalogs: Defines named version catalogs (`lint`, `test`, `tools`) that centralise dependency version ranges. Workspace packages reference these with the `catalog:<name>` protocol (e.g. `"jest": "catalog:test"`) instead of hardcoding version ranges in each `package.json`.
31
+
32
+
Agent guidance for catalogs:
33
+
34
+
- When adding a dependency that belongs to an existing catalog category, add the version range to the appropriate catalog in `pnpm-workspace.yaml` and reference it as `"catalog:<name>"` in the consuming `package.json`.
35
+
- Do not hardcode version ranges in workspace `package.json` files for dependencies that already exist in a catalog — always use the `catalog:` protocol.
36
+
- When updating a dependency version, change it in the catalog entry only; all workspace packages referencing that catalog entry will pick up the new version automatically.
37
+
- If a dependency does not fit any existing catalog, create a new catalog with a suitable name and add the version range there. All dependencies must be managed through catalogs — never hardcode version ranges directly in a `package.json`.
38
+
24
39
## Root package.json – role and usage
25
40
26
-
The root `package.json` is the orchestration manifestgit co for this repo. It does not ship application code; it wires up shared dev tooling and delegates to workspace-level projects.
41
+
The root `package.json` is the orchestration manifest for this repo. It does not ship application code; it wires up shared dev tooling and delegates to workspace-level projects.
27
42
28
-
- Workspaces: Declares the set of npm workspaces (e.g. under `lambdas/`, `utils/`, `tests/`, `scripts/`). Agents should add a new workspace path here when introducing a new npm project.
29
-
- Scripts: Provides top-level commands that fan out across workspaces using `--workspaces` (lint, typecheck, unit tests) and project-specific runners (e.g. `build-archive`).
43
+
- Scripts: Provides top-level commands that fan out across workspaces using `--recursive` / `-r` (lint, typecheck, unit tests) and project-specific runners (e.g. `build-archive`).
30
44
- Dev tool dependencies: Centralises Jest, TypeScript, ESLint configurations and plugins to keep versions consistent across workspaces. Workspace projects should rely on these unless a local override is strictly needed.
31
45
- Overrides/resolutions: Pins transitive dependencies (e.g. Jest/react-is) to avoid ecosystem conflicts. Agents must not remove overrides without verifying tests across all workspaces.
32
46
33
47
Agent guidance:
34
48
35
-
- Before adding or removing a workspace, update the root `workspaces` array and ensure CI scripts still succeed with `npm run lint`, `npm run typecheck`, and `npm run test:unit` at the repo root.
36
-
- When adding repo-wide scripts, keep names consistent with existing patterns (e.g. `lint`, `lint:fix`, `typecheck`, `test:unit`, `build-archive`) and prefer `--workspaces` fan-out.
49
+
- Before adding or removing a workspace, update the root `packages` array in `pnpm-workspace.yaml`and ensure CI scripts still succeed with `pnpm run lint`, `pnpm run typecheck`, and `pnpm run test:unit` at the repo root.
50
+
- When adding repo-wide scripts, keep names consistent with existing patterns (e.g. `lint`, `lint:fix`, `typecheck`, `test:unit`, `build-archive`) and prefer `pnpm -r run` fan-out.
37
51
- Do not publish from the root. If adding a new workspace intended for publication, mark that workspace package as `private: false` and keep the root as private.
38
52
- Validate changes by running the repo pre-commit hooks: `make githooks-run`.
39
53
40
54
Success criteria for changes affecting the root `package.json`:
41
55
42
-
-`npm run lint`, `npm run typecheck`, and `npm run test:unit` pass at the repo root.
43
-
- Workspace discovery is correct (new projects appear under `npm run typecheck --workspaces`).
44
-
- No regression in lambda build tooling (`npm run build-archive`).
56
+
-`pnpm run lint`, `pnpm run typecheck`, and `pnpm run test:unit` pass at the repo root.
57
+
- Workspace discovery is correct (new projects appear under `pnpm run typecheck`).
58
+
- No regression in lambda build tooling (`pnpm run build:archive`).
45
59
46
60
## What Agents Can / Can’t Do
47
61
@@ -81,7 +95,7 @@ When proposing a change, agents should:
81
95
82
96
to catch formatting and basic lint issues. Domain specific checks will be defined in appropriate nested AGENTS.md files.
83
97
84
-
- Suggest at least one extra validation step (for example `npm test` in a lambda, or triggering a specific workflow).
98
+
- Suggest at least one extra validation step (for example `pnpm test` in a lambda, or triggering a specific workflow).
85
99
- Any required follow up activites which fall outside of the current task's scope should be clearly marked with a 'TODO: CCM-12345' comment. The human user should be prompted to create and provide a JIRA ticket ID to be added to the comment.
0 commit comments