Skip to content

Add Agent Playbook section for automated updates - #39

Merged
stefanvacareanu7 merged 1 commit into
masterfrom
docs/agent-update-playbook
Jul 29, 2026
Merged

Add Agent Playbook section for automated updates#39
stefanvacareanu7 merged 1 commit into
masterfrom
docs/agent-update-playbook

Conversation

@stefanvacareanu7

Copy link
Copy Markdown
Contributor

Summary

  • Adds a "## Agent Playbook: Updating This Repository End-to-End" section to README.md documenting how an AI agent (or human) should perform version bumps and other updates to this repo: versioned files, doc regeneration via DocumentationGenerator, local build/test/docker steps, and CI verification.
  • Documentation only; no functional changes.

Test plan

  • Reviewed against build.sbt, .circleci/config.yml, and git history for accuracy.
  • CI checks pass on this PR.

@stefanvacareanu7
stefanvacareanu7 requested a review from lolgab as a code owner July 29, 2026 06:39
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread README.md
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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

@stefanvacareanu7
stefanvacareanu7 merged commit 1662d2c into master Jul 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants