Add Agent Playbook section for automated updates - #39
Conversation
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Pull Request Overview
The 'Agent Playbook' section has been successfully added to the README, meeting the high-level acceptance criteria for repository maintenance documentation. Codacy analysis confirms the repository remains up to standards.
However, a logic error in the step-by-step procedure must be addressed before merging. The current instructions for running local tests will fail when executed by an AI agent (or a human follower) because they omit the necessary command to enter the cloned repository directory before executing build commands. Addressing this ensures the playbook is actually functional for automated updates.
Test suggestions
- Verify 'Files that encode versions' section lists all key build and CI configuration files.
- Verify 'Step-by-step update procedure' correctly references sbt commands for documentation generation and local testing.
- Verify 'Common failure modes' captures specific library dependency risks mentioned in PR description (e.g., scala-xml, sbt version).
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
| 3. **Regenerate the docs**: `sbt "runMain com.codacy.tools.spotbugs.DocumentationGenerator"` (requires step 2 to have completed so the plugin jars are present locally). Review the diff to `docs/patterns.json`, `docs/description/description.json`, and the per-pattern `docs/description/*.md` files for new/removed/renamed patterns. | ||
| 4. **Format and test**: `sbt scalafmtCheckAll scalafmtSbtCheck test` (this mirrors the `check_format_and_test` CircleCI job). | ||
| 5. **Build the Docker image locally**: `sbt "set version := \"latest\"; docker:publishLocal"`. | ||
| 6. **Run `codacy-plugins-test` locally** before pushing — clone https://github.com/codacy/codacy-plugins-test and, per its README, validate the docs and run the pattern/multiple integration tests against your local image, mirroring what the repo's own README documents: |
There was a problem hiding this comment.
🟡 MEDIUM RISK
Suggestion: AI agents following these instructions literally will attempt to run the sbt test commands in the root of the current repository rather than inside the newly cloned codacy-plugins-test directory, leading to command failures. Update step 6 in the 'Step-by-step update procedure' to include 'cd codacy-plugins-test' after the cloning instruction and before running the sbt commands.
Summary
DocumentationGenerator, local build/test/docker steps, and CI verification.Test plan
build.sbt,.circleci/config.yml, and git history for accuracy.