Skip to content

HYPERFLEET-930 - docs: rewrite CLAUDE.md as AGENTS.md#168

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift-hyperfleet:mainfrom
kuudori:HYPERFLEET-930
Jun 2, 2026
Merged

HYPERFLEET-930 - docs: rewrite CLAUDE.md as AGENTS.md#168
openshift-merge-bot[bot] merged 2 commits into
openshift-hyperfleet:mainfrom
kuudori:HYPERFLEET-930

Conversation

@kuudori
Copy link
Copy Markdown
Contributor

@kuudori kuudori commented May 26, 2026

Summary

  • HYPERFLEET-930

Test Plan

  • Unit tests added/updated
  • make test-all passes
  • make lint passes
  • Helm chart changes validated with make test-helm (if applicable)
  • Deployed to a development cluster and verified (if Helm/config changes)
  • E2E tests passed (if cross-component or major changes)

…ttern

Rewrite agent instructions from scratch based on codebase audit.
CLAUDE.md now imports from AGENTS.md via @import for multi-tool
compatibility. Extract CEL and logging conventions into separate
files under docs/conventions/ to reduce token cost per session.
@openshift-ci openshift-ci Bot requested review from mbrudnoy and rafabene May 26, 2026 15:57
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: b2bac414-49b6-43c7-b339-8dcb33300c2d

📥 Commits

Reviewing files that changed from the base of the PR and between e2007af and 31976c4.

📒 Files selected for processing (1)
  • docs/conventions/cel.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/conventions/cel.md

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Comprehensive guidance added for HyperFleet Adapter configuration, CLI subcommands, and operational best practices.
    • CEL expression conventions documented for preconditions, lifecycle conditions, and post-action gates.
    • Go logging standards and structured logging patterns now documented for developers.

Walkthrough

This PR consolidates HyperFleet Adapter documentation by establishing AGENTS.md as the central agent reference document with verification commands, CLI subcommand details, two-config-file override model, code conventions including error-handling patterns, operational gotchas, and internal package directory structure. CLAUDE.md is replaced with a redirect to AGENTS.md. Two new convention documentation files are added: logging.md standardizes slog usage with context.Context-first signatures and structured field propagation; cel.md defines CEL expression conventions, injected variables, custom functions (now(), toJson(), dig()), string extension methods, and links to evaluator and validator implementations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly describes the main change: rewriting CLAUDE.md documentation as AGENTS.md with appropriate Jira reference.
Description check ✅ Passed Description relates to the changeset by referencing the Jira ticket and providing a test plan, though it lacks detail about the documentation updates.
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.
Sec-02: Secrets In Log Output ✅ Passed PR adds only documentation files (AGENTS.md, CLAUDE.md, logging/CEL conventions). No log statements contain tokens, passwords, credentials, or secrets.

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

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

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

@hyperfleet-ci-bot
Copy link
Copy Markdown

hyperfleet-ci-bot Bot commented May 26, 2026

Risk Score: 1 — risk/low

Signal Detail Points
PR size 410 lines (>200) +1
Sensitive paths none +0

Computed by hyperfleet-risk-scorer

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Line 17: Add a short note to AGENTS.md near the development/setup section
(around the `make install-hooks` mention) explaining that the repository's
`.pre-commit-config.yaml` may reference internal hooks (for example
`rh-pre-commit`) that external contributors cannot access, and instruct them to
either comment out or remove those internal hook entries or run `pre-commit
install --forbid-protected-refs`/use `SKIP=` env var before installation;
reference the exact files/entries `.pre-commit-config.yaml` and the internal
hook name `rh-pre-commit` so readers can locate and edit the config.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 1ddc679d-94c6-4bf0-bbeb-bae7c3d67955

📥 Commits

Reviewing files that changed from the base of the PR and between 042f13a and 2bc0b66.

📒 Files selected for processing (65)
  • .golangci.yml
  • .pre-commit-config.yaml
  • AGENTS.md
  • CLAUDE.md
  • Makefile
  • cmd/adapter/main.go
  • docs/conventions/cel.md
  • docs/conventions/logging.md
  • internal/configloader/loader.go
  • internal/configloader/types.go
  • internal/configloader/validator_test.go
  • internal/criteria/cel_evaluator.go
  • internal/criteria/cel_evaluator_test.go
  • internal/criteria/evaluator_scenarios_test.go
  • internal/criteria/evaluator_test.go
  • internal/criteria/evaluator_version_test.go
  • internal/dryrun/dryrun_api_client_test.go
  • internal/dryrun/recording_transport_client.go
  • internal/dryrun/recording_transport_client_test.go
  • internal/dryrun/trace_test.go
  • internal/executor/executor.go
  • internal/executor/executor_test.go
  • internal/executor/handler.go
  • internal/executor/param_extractor.go
  • internal/executor/post_action_executor_test.go
  • internal/executor/resource_executor.go
  • internal/executor/resource_executor_test.go
  • internal/executor/types.go
  • internal/executor/utils_test.go
  • internal/generation/generation.go
  • internal/generation/generation_test.go
  • internal/hyperfleetapi/client.go
  • internal/hyperfleetapi/client_test.go
  • internal/k8sclient/apply.go
  • internal/k8sclient/apply_test.go
  • internal/k8sclient/client.go
  • internal/k8sclient/discovery.go
  • internal/k8sclient/interface.go
  • internal/k8sclient/mock.go
  • internal/maestroclient/client.go
  • internal/maestroclient/client_test.go
  • internal/maestroclient/interface.go
  • internal/maestroclient/ocm_logger_adapter.go
  • internal/maestroclient/operations.go
  • internal/maestroclient/operations_test.go
  • internal/manifest/generation.go
  • internal/manifest/generation_test.go
  • internal/manifest/render.go
  • internal/transportclient/interface.go
  • pkg/health/metrics.go
  • pkg/health/metrics_test.go
  • pkg/health/server_test.go
  • pkg/logger/stack_trace.go
  • pkg/logger/with_error_field_test.go
  • pkg/telemetry/otel.go
  • pkg/telemetry/otel_test.go
  • test/integration/config-loader/loader_template_test.go
  • test/integration/executor/executor_integration_test.go
  • test/integration/executor/executor_k8s_integration_test.go
  • test/integration/executor/main_test.go
  • test/integration/executor/setup_test.go
  • test/integration/k8sclient/helper_selector.go
  • test/integration/maestroclient/client_integration_test.go
  • test/integration/maestroclient/client_tls_config_integration_test.go
  • test/integration/maestroclient/client_tls_integration_test.go

Comment thread AGENTS.md
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/conventions/cel.md (1)

40-40: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Clarify the reference to separate registration locations.

The reference combines two distinct registrations (custom functions and ext.Strings()) under a single line number, which is misleading:

  • ext.Strings() is registered in buildCELOptions() around line 67
  • Custom functions (now, toJson, dig) are registered in customCELFunctions() starting around line 71

Developers looking up the implementation may be confused about where to find each component.

📝 Suggested clarification
-- Custom functions registered: `internal/criteria/cel_evaluator.go:71` (`ext.Strings()`)
+- Custom functions and string extensions: `internal/criteria/cel_evaluator.go` (see `customCELFunctions()` and `buildCELOptions()`)

Alternatively, to avoid line-number drift, reference the functions by name rather than line numbers.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/conventions/cel.md` at line 40, Update the documentation line that
currently lumps registrations together by splitting the references: state that
ext.Strings() is registered via buildCELOptions() and that the custom CEL
functions now, toJson, and dig are registered via customCELFunctions() in
internal/criteria/cel_evaluator.go; remove the specific line numbers and
reference the registration functions and function names instead so readers can
locate buildCELOptions(), customCELFunctions(), ext.Strings(), now, toJson, and
dig directly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/conventions/cel.md`:
- Line 40: Update the documentation line that currently lumps registrations
together by splitting the references: state that ext.Strings() is registered via
buildCELOptions() and that the custom CEL functions now, toJson, and dig are
registered via customCELFunctions() in internal/criteria/cel_evaluator.go;
remove the specific line numbers and reference the registration functions and
function names instead so readers can locate buildCELOptions(),
customCELFunctions(), ext.Strings(), now, toJson, and dig directly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: da23348d-adeb-45d9-91ca-fde9219afdac

📥 Commits

Reviewing files that changed from the base of the PR and between 2bc0b66 and e2007af.

📒 Files selected for processing (1)
  • docs/conventions/cel.md

…s doc

adapter metadata fields were wrong (name, status). Actual fields:
executionStatus, resourcesSkipped, skipReason, errorReason,
errorMessage, executionError, resourceErrors. Fix examples to
use real expressions from adapter-task-config-template.yaml.
@rafabene
Copy link
Copy Markdown
Contributor

rafabene commented Jun 2, 2026

/lgtm

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jun 2, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rafabene

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

The pull request process is described 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 approved label Jun 2, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit bcd847c into openshift-hyperfleet:main Jun 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants