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
Copy file name to clipboardExpand all lines: AGENTS.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,9 @@ Use these defaults unless the user asks otherwise:
15
15
2. Do not preserve backward compatibility when it isn't required. When all callers are internal to a package,
16
16
rename or restructure freely. All packages in this repo are published to npm and consumed externally, so treat
17
17
each package's public exports as a contract and preserve compatibility unless explicitly told otherwise.
18
-
3. Write comments that explain the current code, not its history. Do not reference prior implementations,
19
-
intermediate states, or what the code "used to do." If an approach seems counterintuitive, explain why it is
20
-
correct now — not why it changed.
18
+
3. Write comments that explain the current code, not its history or the work that produced it. Do not reference
19
+
prior implementations, intermediate states, what the code "used to do," or the task plan, ticket, or
20
+
instructions that prompted the change. If an approach seems counterintuitive, explain why it is correct now.
21
21
4. Prefer fixing root causes over adding surface-level workarounds or assertions.
22
22
5. When fixing a bug, start by adding one or more failing tests that reproduce it, then implement the fix. Iterate
23
23
until all tests pass, including but not limited to the new tests. Use the test framework already in use in that
@@ -60,9 +60,10 @@ npm test --workspace=packages/scratch-vm
60
60
61
61
Each package defines its own `test` and `build` scripts; see "Packages at a glance" for specifics.
62
62
63
-
**After all code changes are complete**, run the tests and linter in the affected packages before moving on:
63
+
**After all code changes are complete**, run the build, tests, and linter in the affected packages and verify they complete with no errors before moving on:
64
64
65
65
```sh
66
+
npm run build --workspace=packages/<package-name>
66
67
npm test --workspace=packages/<package-name>
67
68
npm run lint --workspace=packages/<package-name>
68
69
```
@@ -154,6 +155,3 @@ Review all changes and confirm:
154
155
(commands, repo structure, conventions, etc.). The "Packages at a glance" table is particularly prone to going
155
156
stale when a package migrates its tooling.
156
157
-**Commit format**: Commit message follows Conventional Commits — the husky hook will reject it otherwise.
157
-
-**Build passes**: `npm run build` (or `npm run build` in the affected package) completes successfully.
158
-
-**Tests pass**: `npm test` (or `npm test` in the affected package) completes with no failures.
159
-
-**No lint errors**: `npm run test:lint` (or `npm run lint`) passes in the affected package.
0 commit comments