Add Agent Playbook section for automated updates - #5016
Conversation
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Pull Request Overview
The proposed Agent Playbook contains a critical instructional error regarding dependency management. Specifically, the recommendation to use --omit=dev will prune the toolchain (TypeScript, ESLint, test runners) required for the subsequent verification steps, effectively breaking the local workflow for any agent or developer following the guide.
While Codacy results are up to standards, there are significant gaps in the documentation coverage. The playbook currently lacks specific guidance for updating src/eslintPlugins.ts, executing npm run build:docs for machine-consumed file updates, and utilizing codacy-plugins-test for local validation. These missing elements are necessary to ensure a complete and reliable update process.
About this PR
- The documentation systematically recommends using
--omit=devduring dependency updates. This should be corrected across all sections of the playbook to ensure the development environment remains functional for linting and testing.
Test suggestions
- Verify the documentation includes specific instructions for updating 'src/eslintPlugins.ts' when adding new plugins.
- Verify the playbook correctly identifies the need to run 'npm run build:docs' to update machine-consumed files in 'docs/'.
- Verify the inclusion of 'codacy-plugins-test' local execution in the validation steps.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify the documentation includes specific instructions for updating 'src/eslintPlugins.ts' when adding new plugins.
2. Verify the playbook correctly identifies the need to run 'npm run build:docs' to update machine-consumed files in 'docs/'.
3. Verify the inclusion of 'codacy-plugins-test' local execution in the validation steps.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
|
|
||
| 1. **Install/bump the target package(s)** in `package.json`: | ||
| ```bash | ||
| npm install --legacy-peer-deps --omit=dev <package-name>@<version> |
There was a problem hiding this comment.
🔴 HIGH RISK
Remove the --omit=dev flag to ensure that the development dependencies needed for building and testing the engine are preserved.
|
|
||
| | File | What it controls | What to check | | ||
| |---|---|---| | ||
| | `package.json` → `dependencies` | The pinned version of ESLint itself (`"eslint": "^8.57.0"`) and every bundled plugin/config (`eslint-plugin-*`, `eslint-config-*`, `@scope/eslint-plugin-*`, plus supporting libs like `typescript`, `webpack`, `next`, etc.) | Bump the specific package(s) named in the task, e.g. `npm install --legacy-peer-deps --omit=dev eslint-plugin-jsdoc@latest` (see recent commit `c1a4471` "Bump eslint-plugin-jsdoc" for the exact shape: only `package.json`/`package-lock.json` + regenerated `docs/description/*` changed). Respect the `preupgrade` script's excluded packages (`@teambit/react.eslint-config-bit-react`, `eslint` itself pinned to `latest` overall, `eslint-plugin-lodash` pinned to minor) if doing a bulk upgrade. | |
There was a problem hiding this comment.
🔴 HIGH RISK
The recommendation to use --omit=dev will remove development dependencies required for the subsequent build, lint, and test steps. Remove this flag to ensure the local environment remains functional for the entire playbook workflow.
Summary
Test plan