Skip to content

TRT-2655: Add APM docs instruction rule for keeping docs up-to-date#3509

Open
redhat-chai-bot wants to merge 1 commit intoopenshift:mainfrom
redhat-chai-bot:ship-help/trt-2655-docs-instructions
Open

TRT-2655: Add APM docs instruction rule for keeping docs up-to-date#3509
redhat-chai-bot wants to merge 1 commit intoopenshift:mainfrom
redhat-chai-bot:ship-help/trt-2655-docs-instructions

Conversation

@redhat-chai-bot
Copy link
Copy Markdown

@redhat-chai-bot redhat-chai-bot commented May 7, 2026

Summary

Adds a new .apm/instructions/docs.instructions.md rule that instructs AI coding assistants to keep documentation in sync with code changes.

What the rule enforces

  • Update relevant READMEs when setup steps, usage instructions, or architecture changes
  • Update pkg/api/README.md when API endpoints are added, removed, or modified
  • Update config/README.md or the root README when configuration options, environment variables, or CLI flags change
  • Consider adding or updating .apm/instructions/ files when new conventions, workflows, or tooling are introduced
  • Documentation and code belong in the same PR — never treat docs as a follow-up task

Changes

  • New file: .apm/instructions/docs.instructions.md
  • Compiled outputs updated via apm install && apm compile (apm-cli@0.11.0):
    • AGENTS.md, CLAUDE.md, apm.lock.yaml
    • .claude/rules/docs.md, .cursor/rules/docs.mdc

Jira: https://redhat.atlassian.net/browse/TRT-2655

Summary by CodeRabbit

  • Documentation

    • Added development documentation guidance to standardize when to update README files and configuration documentation across the project.
  • Chores

    • Updated project configuration files to reference newly added rule files.

Adds a new .apm/instructions/docs.instructions.md rule that instructs
AI coding assistants to keep documentation in sync with code changes:

- Update relevant READMEs when setup, usage, or architecture changes
- Update API docs when endpoints change
- Update config docs when options, env vars, or CLI flags change
- Consider updating .apm/instructions/ files for new conventions
- Land docs and code together, never as a follow-up

Compiled with apm-cli@0.11.0 (apm install && apm compile).
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 7, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 7, 2026

@redhat-ship-help: This pull request references TRT-2655 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

Adds a new .apm/instructions/docs.instructions.md rule that instructs AI coding assistants to keep documentation in sync with code changes.

What the rule enforces

  • Update relevant READMEs when setup steps, usage instructions, or architecture changes
  • Update pkg/api/README.md when API endpoints are added, removed, or modified
  • Update config/README.md or the root README when configuration options, environment variables, or CLI flags change
  • Consider adding or updating .apm/instructions/ files when new conventions, workflows, or tooling are introduced
  • Documentation and code belong in the same PR — never treat docs as a follow-up task

Changes

  • New file: .apm/instructions/docs.instructions.md
  • Compiled outputs updated via apm install && apm compile (apm-cli@0.11.0):
  • AGENTS.md, CLAUDE.md, apm.lock.yaml
  • .claude/rules/docs.md, .cursor/rules/docs.mdc

Jira: https://redhat.atlassian.net/browse/TRT-2655

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from smg247 and sosiouxme May 7, 2026 15:44
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: redhat-ship-help
Once this PR has been reviewed and has the lgtm label, please assign xueqzhan for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 7, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

Hi @redhat-ship-help. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 486bcfe8-b2dc-4d54-b9c1-1a12516d2bdb

📥 Commits

Reviewing files that changed from the base of the PR and between 701ddd6 and db36320.

⛔ Files ignored due to path filters (4)
  • .claude/rules/docs.md is excluded by !.claude/**
  • .cursor/rules/docs.mdc is excluded by !.cursor/**
  • AGENTS.md is excluded by !AGENTS.md
  • CLAUDE.md is excluded by !CLAUDE.md
📒 Files selected for processing (2)
  • .apm/instructions/docs.instructions.md
  • apm.lock.yaml

Walkthrough

A new documentation guidance file is added to standardize when and how developers should update documentation during code changes, and the project lockfile is updated to track additional rule configuration files.

Changes

Documentation Guidance and Lockfile Update

Layer / File(s) Summary
Documentation Guidance
.apm/instructions/docs.instructions.md
New file establishes conventions for keeping READMEs, API docs, and configuration docs synchronized with code changes; requires docs updates in the same PR as corresponding code changes.
Lockfile Metadata
apm.lock.yaml
local_deployed_files list and corresponding local_deployed_file_hashes are updated to include .claude/rules/{docs,frontend,general,mcp,testing}.md and .cursor/rules/docs.mdc.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 16 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Go Error Handling ⚠️ Warning Multiple panic() calls found outside init() or fatal conditions in serve.go, automatejira.go, intentional_regressions.go, and mode.go. Underscore error ignoring without clear justification. Fix panic() calls to use proper error returns. Replace panic(err) with returning errors or log.Fatal() for true fatal conditions only. Document and justify underscore error ignores.
✅ Passed checks (16 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding APM docs instruction rules to enforce keeping documentation up-to-date with code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Sql Injection Prevention ✅ Passed PR contains only documentation and configuration changes. No executable code files were modified and no SQL queries are constructed. Check is not applicable.
Excessive Css In React Should Use Styles ✅ Passed This PR contains no React components or JSX source files, only documentation and configuration updates. The custom check for excessive inline CSS in React is not applicable.
Test Coverage For New Features ✅ Passed PR contains only documentation and configuration changes: new APM instruction file, generated rules, and updated lockfiles. No functional code or test coverage needed.
Single Responsibility And Clear Naming ✅ Passed This PR only adds documentation and config file changes. No code entities (packages, structs, methods) are modified, making the check inapplicable.
Stable And Deterministic Test Names ✅ Passed PR modifies no test files. Repository uses Go standard testing, not Ginkgo. Custom check for Ginkgo test names is not applicable.
Test Structure And Quality ✅ Passed PR does not contain any Ginkgo test code. The check is not applicable as this PR only adds documentation guidance and updates configuration files.
Microshift Test Compatibility ✅ Passed This PR adds only documentation and config files (.apm/instructions/docs.instructions.md). No new Ginkgo e2e tests are added, so the MicroShift compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR does not add Ginkgo e2e tests. Test files use standard Go testing (testing.T), not Ginkgo. The SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Custom check not applicable. PR only adds documentation and instruction files with no deployment manifests, operator code, or scheduling constraints.
Ote Binary Stdout Contract ✅ Passed PR only adds documentation and configuration files. No Go production code changes. OTE check applies to compilable binaries, so no violations possible.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Check is not applicable to this PR. The IPv6/Disconnected Network check targets Ginkgo e2e tests; this PR only adds documentation instruction files and updates a lockfile, with no test code changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-merge-bot openshift-merge-bot Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label May 7, 2026
@petr-muller
Copy link
Copy Markdown
Member

/ok-to-test

@openshift-ci openshift-ci Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 7, 2026
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

@redhat-ship-help: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants