Skip to content

docs, feat(SREP-4460, SREP-4926: Add Standardized Claude hooks, skill, agents. Update standardised docs)#438

Open
devppratik wants to merge 1 commit into
openshift:masterfrom
devppratik:add-claude-and-docs
Open

docs, feat(SREP-4460, SREP-4926: Add Standardized Claude hooks, skill, agents. Update standardised docs)#438
devppratik wants to merge 1 commit into
openshift:masterfrom
devppratik:add-claude-and-docs

Conversation

@devppratik
Copy link
Copy Markdown
Contributor

@devppratik devppratik commented May 29, 2026

What type of PR is this?

docs/feature

What this PR does / why we need it?

  • This PR brings the docs up to Agentic SDLC contribution standard
  • It also adds .claude which includes standardized hooks, skills and agents

Changes

New Infrastructure:

  • .claude/agents/ - 5 specialized agents
  • .claude/hooks/ - Validation hooks
  • .claude/skills/prow-ci/ - Prow CI skill
  • .claude/settings.json - Permissions

Validation:

  • prek.toml + hack/prek.ci.toml
  • .gitleaks.toml - Secret scanning
  • hack/ci.sh - CI validation

Documentation:

  • CONTRIBUTING.md, DEVELOPMENT.md, TESTING.md
  • CLAUDE.md - Preserved existing

References

Summary by CodeRabbit

  • Documentation

    • Added extensive contributor, development, testing, and CI/agent guidance; new docs for automated agents and skills.
  • Chores

    • Enabled pre-commit and CI validations (linting, build, module checks) and secret scanning with updated config.
    • Added stop/pre-edit/cleanup hooks and automation to run validations on edit/stop events.
    • Exposed internal assistant config and permissions.
    • Updated project version to v0.4.1 and tracked previously-ignored assistant files.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

Warning

Review limit reached

@devppratik, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 9 minutes and 8 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: cc5b892d-f111-495a-8435-609994b37f60

📥 Commits

Reviewing files that changed from the base of the PR and between 1756d7b and d91da99.

📒 Files selected for processing (22)
  • .claude/agents/README.md
  • .claude/agents/ci-agent.md
  • .claude/agents/docs-agent.md
  • .claude/agents/lint-agent.md
  • .claude/agents/security-agent.md
  • .claude/agents/test-agent.md
  • .claude/hooks/README.md
  • .claude/hooks/cleanup.sh
  • .claude/hooks/pre-edit.sh
  • .claude/hooks/stop-prek-validation.sh
  • .claude/settings.json
  • .claude/skills/README.md
  • .claude/skills/prow-ci/SKILL.md
  • .gitignore
  • .gitleaks.toml
  • .prek-version
  • CONTRIBUTING.md
  • DEVELOPMENT.md
  • TESTING.md
  • hack/ci.sh
  • hack/prek.ci.toml
  • prek.toml

Walkthrough

This PR establishes developer-experience infrastructure: gitleaks secret scanning, Prek-based pre-commit hooks for local and CI, a CI entrypoint script, Claude agents/hooks/skills and related scripts, and CONTRIBUTING/DEVELOPMENT/TESTING documentation.

Changes

Developer Experience and CI Infrastructure

Layer / File(s) Summary
Secret scanning configuration
.gitleaks.toml, .gitignore
Custom gitleaks rules detect OCM tokens, OpenShift pull secrets, embedded kubeconfigs, and PEM private keys; .claude/ was removed from .gitignore so the directory is tracked.
Pre-commit hook framework and version pin
prek.toml, hack/prek.ci.toml, .prek-version
Local and CI Prek configs enable builtin hygiene checks, gitleaks (wired to .gitleaks.toml), golangci-lint, Red Hat InfoSec hook, and local system hooks for go build, go mod tidy enforcement, and RBAC wildcard checks. Version pinned via .prek-version.
CI validation entrypoint
hack/ci.sh
Bash script with strict error handling that checks for prek and runs prek using hack/prek.ci.toml to validate the repository in CI.
Claude agents, hooks, and skills + repo docs
.claude/..., CONTRIBUTING.md, DEVELOPMENT.md, TESTING.md
Adds Claude agent specs, hook scripts (pre-edit.sh, stop-prek-validation.sh, cleanup), settings, skill docs, and comprehensive contributor/developer/testing guides.

🎯 2 (Simple) | ⏱️ ~12 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Ote Binary Stdout Contract ❌ Error fips.go init() function calls fmt.Println() to stdout at process startup, violating OTE binary JSON stdout contract that openshift-tests depends on. Replace fmt.Println() in fips.go init() with stderr output (e.g., fmt.Fprintln(os.Stderr, ...)) or structured logging via controller-runtime's logger.
Test Structure And Quality ⚠️ Warning TESTING.md examples violate requirements: lack single responsibility, missing timeouts on Eventually, assertions lack messages. Also documents Ginkgo but actual tests use standard Go testing. Refactor test examples to show single responsibility, add timeout values, exemplify assertion messages, or align with actual codebase patterns.
Title check ❓ Inconclusive The title is overly complex and vague. It uses ticket references (SREP-4460, SREP-4926) and generic terms like "docs, feat" and "standardised docs" without clearly identifying the primary change from the developer's perspective. Simplify the title to clearly describe the main change—either focusing on Claude automation infrastructure, documentation updates, or validation tooling. For example: 'Add Claude agents, hooks, and standardized developer documentation' or 'Add pre-commit validation and contributor tooling infrastructure.'
✅ Passed checks (12 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
Stable And Deterministic Test Names ✅ Passed PR adds no Ginkgo tests; codebase uses standard Go testing framework. Check is not applicable.
Microshift Test Compatibility ✅ Passed No Ginkgo e2e tests (It/Describe/etc.) added in this PR. All 11 new test files use standard Go testing with func Test... patterns, so the custom check does not apply.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR contains no Ginkgo e2e tests—only docs, config, and scripts. SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR contains only documentation, configuration, and tooling changes; no deployment manifests, operator code, or scheduling constraints were introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR adds no new Ginkgo e2e tests. All changes are documentation (.md files), configuration files (.toml, .json, .sh scripts), and Claude infrastructure. No Go test files were added or modified.
No-Weak-Crypto ✅ Passed No weak cryptographic implementations (MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB) detected. PR contains only configuration, documentation, and scripts with no custom crypto or insecure comparisons.
Container-Privileges ✅ Passed PR contains no container/Kubernetes manifests or privileged container configurations; only documentation, pre-commit configs, and Claude automation infrastructure.
No-Sensitive-Data-In-Logs ✅ Passed No logging exposes sensitive data. Hook outputs contain only file paths, validation guidance, and non-sensitive error messages. Gitleaks (secret scanner) is excluded from the stop hook config.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot requested review from clcollins and nephomaniac May 29, 2026 08:03
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 29, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: devppratik
Once this PR has been reviewed and has the lgtm label, please assign bergmannf 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

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: 6

🤖 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 @.gitleaks.toml:
- Around line 25-32: Remove the overly-broad '''.*_test\.go''' entry from the
paths = [...] allowlist in .gitleaks.toml and replace it with narrowly scoped
patterns that only exclude known safe test locations or fake-test files (for
example keep '''test/fixtures/.*''' and add targeted patterns such as
'''test/.*_test\.go''' or specific fake/test-data patterns like
'''fixtures/.*_fake_test\.go''' or '''.*_fake_test\.go'''), updating the paths
array accordingly and optionally add an inline comment next to the new patterns
to indicate they are explicit, safe test allowlists; reference the existing
paths array and the literal pattern '''.*_test\.go''' to locate and modify the
rule.

In `@CONTRIBUTING.md`:
- Around line 7-8: Update the documented toolchain versions so they match the
repository configuration: reconcile Go version in CONTRIBUTING.md (currently "Go
1.22.7+") with the go.mod requirement (Go 1.25.0) by either bumping the
CONTRIBUTING.md minimum to 1.25.0 or aligning go.mod to the documented minimum;
similarly verify the actual operator-sdk/tooling used by the repo and replace
the hardcoded "operator-sdk v1.21.0" in CONTRIBUTING.md and DEVELOPMENT.md with
the confirmed version (or add an explicit install/pin instruction) so docs
reflect the real toolchain used by the build scripts.

In `@DEVELOPMENT.md`:
- Around line 194-198: The two links labeled "Design Documentation" and "How to
Test" in DEVELOPMENT.md point to non-existent paths; either create
docs/design.md and docs/how-to-test.md with the intended content or update the
links to existing files (for example replace ./docs/design.md with the actual
design doc path in the repo and ./docs/how-to-test.md with the existing
TESTING.md or another how-to file). Make the change directly in DEVELOPMENT.md
by editing the link targets for the "Design Documentation" and "How to Test"
list items (or add the missing markdown files) so both links resolve to real
files.

In `@hack/prek.ci.toml`:
- Around line 19-29: hack/prek.ci.toml is missing the gitleaks pre-commit hook
so CI run via "prek run --config hack/prek.ci.toml --all-files" skips secret
scanning; add a [[repos]] entry for the gitleaks repo with a hooks list
containing the { id = "gitleaks", args = [...] } hook (mirroring the gitleaks
block from prek.toml) so the gitleaks scan runs in this config; ensure the repo
URL, rev/version, and any required args (e.g. rules/config path or
--staged/--verbose flags) match the existing prek.toml gitleaks configuration.

In `@TESTING.md`:
- Around line 264-274: The Pre-commit Integration section contains a go-test
YAML hook snippet but also states tests are NOT in the current pre-commit
config, which is confusing; update TESTING.md by keeping the YAML snippet but
clearly label it as an example (e.g., "Example (not currently used)") and add
one clear sentence after the snippet that tests are intentionally not run in
pre-commit because they are slow and that developers should run the test command
manually using "make go-test"; ensure the snippet and the manual-run instruction
("make go-test") are adjacent so readers understand the snippet is illustrative
only.
- Around line 100-104: The TESTING.md E2E section currently points to a
non-existent path 'test/e2e/' under the "E2E Tests" bullet; update that
reference or create the missing directory. Locate the "E2E Tests" block in
TESTING.md (the line that reads "Located in `test/e2e/`") and either change the
path string to the repository's real E2E test location (e.g., the actual
directory where e2e tests live) or add the ./test/e2e/ directory with the E2E
tests, and ensure the CI/Tekton note still matches the updated path.
🪄 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: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 829fa19d-c40d-4491-8ea2-d039af0e1996

📥 Commits

Reviewing files that changed from the base of the PR and between 6fb9725 and d4894a9.

📒 Files selected for processing (8)
  • .gitleaks.toml
  • .prek-version
  • CONTRIBUTING.md
  • DEVELOPMENT.md
  • TESTING.md
  • hack/ci.sh
  • hack/prek.ci.toml
  • prek.toml

Comment thread .gitleaks.toml
Comment on lines +25 to +32
paths = [
'''test/fixtures/.*''',
'''test/deploy/.*''',
'''.*_test\.go''',
'''boilerplate/.*''',
'''vendor/.*''',
'''zz_generated\..*\.go''',
]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Narrow the global _test.go allowlist to avoid secret-scanning blind spots.

Line 28 excludes every Go test file from scanning, which can silently permit real credentials in tests. Restrict allowlisting to fixture paths or exact known fake patterns instead of all *_test.go files.

Suggested change
 paths = [
   '''test/fixtures/.*''',
   '''test/deploy/.*''',
-  '''.*_test\.go''',
   '''boilerplate/.*''',
   '''vendor/.*''',
   '''zz_generated\..*\.go''',
 ]

Based on learnings: Never commit secrets, tokens, credentials, API keys, AWS credentials, kubeconfig files, private keys, certificates, .env files with secrets, or debug statements printing sensitive data.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
paths = [
'''test/fixtures/.*''',
'''test/deploy/.*''',
'''.*_test\.go''',
'''boilerplate/.*''',
'''vendor/.*''',
'''zz_generated\..*\.go''',
]
paths = [
'''test/fixtures/.*''',
'''test/deploy/.*''',
'''boilerplate/.*''',
'''vendor/.*''',
'''zz_generated\..*\.go''',
]
🤖 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 @.gitleaks.toml around lines 25 - 32, Remove the overly-broad
'''.*_test\.go''' entry from the paths = [...] allowlist in .gitleaks.toml and
replace it with narrowly scoped patterns that only exclude known safe test
locations or fake-test files (for example keep '''test/fixtures/.*''' and add
targeted patterns such as '''test/.*_test\.go''' or specific fake/test-data
patterns like '''fixtures/.*_fake_test\.go''' or '''.*_fake_test\.go'''),
updating the paths array accordingly and optionally add an inline comment next
to the new patterns to indicate they are explicit, safe test allowlists;
reference the existing paths array and the literal pattern '''.*_test\.go''' to
locate and modify the rule.

Comment thread CONTRIBUTING.md
Comment on lines +7 to +8
1. **Setup**: Install Go 1.22.7+, operator-sdk v1.21.0
2. **Install tools**: `make tools`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify Go and operator-sdk version requirements

# Check go.mod for Go version
if [ -f go.mod ]; then
  echo "=== Go version in go.mod ==="
  rg -n '^go [0-9.]+' go.mod
fi

# Check for operator-sdk version references
echo "=== operator-sdk version references ==="
rg -n 'operator-sdk.*v[0-9.]+' --type yaml --type md --type make

# Check Makefile for version requirements
if [ -f Makefile ]; then
  echo "=== Makefile version checks ==="
  rg -n -A2 -B2 'OPERATOR_SDK|GO_VERSION|go.*version' Makefile
fi

Repository: openshift/pagerduty-operator

Length of output: 303


Align documented toolchain versions with repo config

  • go.mod requires Go 1.25.0, but CONTRIBUTING.md says “Go 1.22.7+”; update the documented minimum (or the go.mod) to match.
  • operator-sdk v1.21.0 is only referenced in docs (CONTRIBUTING.md, DEVELOPMENT.md)—confirm the repo’s actual operator-sdk version/tooling (or add the install pin) instead of hardcoding this value.
🤖 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 `@CONTRIBUTING.md` around lines 7 - 8, Update the documented toolchain versions
so they match the repository configuration: reconcile Go version in
CONTRIBUTING.md (currently "Go 1.22.7+") with the go.mod requirement (Go 1.25.0)
by either bumping the CONTRIBUTING.md minimum to 1.25.0 or aligning go.mod to
the documented minimum; similarly verify the actual operator-sdk/tooling used by
the repo and replace the hardcoded "operator-sdk v1.21.0" in CONTRIBUTING.md and
DEVELOPMENT.md with the confirmed version (or add an explicit install/pin
instruction) so docs reflect the real toolchain used by the build scripts.

Comment thread DEVELOPMENT.md
Comment on lines +194 to +198

- [Testing Guide](./TESTING.md)
- [Design Documentation](./docs/design.md)
- [How to Test](./docs/how-to-test.md)
- [Operator SDK Docs](https://sdk.operatorframework.io/)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for referenced documentation files

echo "=== Checking for referenced docs ==="
for doc in "docs/design.md" "docs/how-to-test.md"; do
  if [ -f "$doc" ]; then
    echo "✓ Found: $doc"
  else
    echo "✗ Missing: $doc"
  fi
done

echo ""
echo "=== Available docs in docs/ directory ==="
fd . docs/ --type f --extension md 2>/dev/null || echo "docs/ directory not found or empty"

Repository: openshift/pagerduty-operator

Length of output: 244


Fix broken documentation links in DEVELOPMENT.md (lines 194-198).

./docs/design.md and ./docs/how-to-test.md are missing (no docs/ directory exists). Update these links to point to existing documentation files in the repo, or add the missing markdown files.

🤖 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 `@DEVELOPMENT.md` around lines 194 - 198, The two links labeled "Design
Documentation" and "How to Test" in DEVELOPMENT.md point to non-existent paths;
either create docs/design.md and docs/how-to-test.md with the intended content
or update the links to existing files (for example replace ./docs/design.md with
the actual design doc path in the repo and ./docs/how-to-test.md with the
existing TESTING.md or another how-to file). Make the change directly in
DEVELOPMENT.md by editing the link targets for the "Design Documentation" and
"How to Test" list items (or add the missing markdown files) so both links
resolve to real files.

Comment thread hack/prek.ci.toml
Comment thread TESTING.md
Comment on lines +100 to +104
### E2E Tests
- Full operator deployment
- Real cluster interaction
- Located in `test/e2e/`
- Run in CI via Tekton
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify E2E test directory structure

echo "=== Checking for E2E test directory ==="
if [ -d "test/e2e" ]; then
  echo "✓ Found: test/e2e/"
  echo ""
  echo "=== E2E test files ==="
  fd . test/e2e/ --type f --extension go 2>/dev/null | head -20
else
  echo "✗ Directory not found: test/e2e/"
  echo ""
  echo "=== Available test directories ==="
  fd . test/ --type d --max-depth 2 2>/dev/null || echo "test/ directory not found"
fi

Repository: openshift/pagerduty-operator

Length of output: 207


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Repo top-level dirs ==="
ls -la

echo
echo "=== Find directories named *e2e* ==="
fd -t d -i '(^|/)(e2e)(/|$)' . --max-depth 6 2>/dev/null || true
# Fallback for older fd versions
find . -maxdepth 6 -type d -iname '*e2e*' 2>/dev/null | head -50

echo
echo "=== Find references to 'test/e2e' and 'e2e/' ==="
rg -n "test/e2e|\\be2e\\b|Tekton" TESTING.md . || true

echo
echo "=== Find directories under test/ (if present) ==="
if [ -d "test" ]; then
  find test -maxdepth 3 -type d 2>/dev/null
else
  echo "No ./test directory"
fi

Repository: openshift/pagerduty-operator

Length of output: 6336


Fix TESTING.md E2E test path

TESTING.md references test/e2e/ (lines ~103-104), but the repository has no ./test/ directory (so test/e2e/ doesn’t exist). Update the documentation to the real E2E test location or add the missing directory/tests.

🤖 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 `@TESTING.md` around lines 100 - 104, The TESTING.md E2E section currently
points to a non-existent path 'test/e2e/' under the "E2E Tests" bullet; update
that reference or create the missing directory. Locate the "E2E Tests" block in
TESTING.md (the line that reads "Located in `test/e2e/`") and either change the
path string to the repository's real E2E test location (e.g., the actual
directory where e2e tests live) or add the ./test/e2e/ directory with the E2E
tests, and ensure the CI/Tekton note still matches the updated path.

Comment thread TESTING.md
@devppratik devppratik changed the title docs, feat(SREP-4460, SREP-4926): Add Standardized Claude hooks, skill, agents. Update standardised docs docs, feat(SREP-4460, SREP-4926: Add Standardized Claude hooks, skill, agents. Update standardised docs) May 29, 2026
@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 29, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 29, 2026

@devppratik: This pull request references SREP-4460 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 story to target the "5.0.0" version, but no target version was set.

This pull request references SREP-4926 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:

What type of PR is this?

docs/feature

What this PR does / why we need it?

  • This PR brings the docs up to Agentic SDLC contribution standard
  • It also adds .claude which includes standardized hooks, skills and agents

Changes

New Infrastructure:

  • .claude/agents/ - 5 specialized agents
  • .claude/hooks/ - Validation hooks
  • .claude/skills/prow-ci/ - Prow CI skill
  • .claude/settings.json - Permissions

Validation:

  • prek.toml + hack/prek.ci.toml
  • .gitleaks.toml - Secret scanning
  • hack/ci.sh - CI validation

Documentation:

  • CONTRIBUTING.md, DEVELOPMENT.md, TESTING.md
  • CLAUDE.md - Preserved existing

References

Summary by CodeRabbit

  • Documentation

  • Added comprehensive contributor guidelines and development setup instructions.

  • Added detailed testing documentation with frameworks and best practices.

  • Chores

  • Configured pre-commit hooks for code quality, security scanning, and linting.

  • Set up CI pipeline configuration with build and dependency checks.

  • Added secret detection configuration.

  • Updated version to v0.4.1.

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.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.07%. Comparing base (12b4c06) to head (d91da99).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #438   +/-   ##
=======================================
  Coverage   61.07%   61.07%           
=======================================
  Files          22       22           
  Lines        1824     1824           
=======================================
  Hits         1114     1114           
  Misses        567      567           
  Partials      143      143           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@clcollins
Copy link
Copy Markdown
Member

/hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 29, 2026
@devppratik devppratik force-pushed the add-claude-and-docs branch 2 times, most recently from 1756d7b to b0b2183 Compare May 29, 2026 17:52
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: 4

🤖 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 @.claude/agents/docs-agent.md:
- Around line 188-198: The fenced code block that begins with the lines
"Updated: DEVELOPMENT.md" and the list of changes is missing a language
identifier after the opening triple backticks; add a language tag (e.g., "text")
immediately after the opening ``` so the block reads ```text and keep the rest
of the content and the closing ``` unchanged to satisfy markdown lint and
improve readability.

In @.claude/hooks/pre-edit.sh:
- Around line 18-27: The path normalization currently only strips prefixes and
can be bypassed by "../" segments; update the logic that sets REPO_ROOT and FILE
so FILE is canonicalized and made repo-relative (resolve symlinks and collapse
".." and "." segments) before applying pattern checks. Specifically, after
computing REPO_ROOT and before stripping "./", replace the current FILE handling
with a canonicalization step (e.g., use realpath --canonicalize-missing or a
small python/os.path.realpath+relpath fallback) to compute FILE as the
repository-relative canonical path; keep the existing removal of a leading "./"
afterward. Ensure you adjust the code referencing REPO_ROOT and FILE so all
matching uses the canonical repo-relative FILE.

In @.claude/hooks/README.md:
- Around line 180-184: Update the "Automatic Validation" docs so they match the
hook implementation: change the Stop hook command text from `prek run
--all-files` to `prek run --config hack/prek.ci.toml` (and verify or clarify the
pre-commit hook description if needed); specifically edit the "Automatic
Validation" section that references the Stop hook to reflect the actual `prek
run --config hack/prek.ci.toml` invocation used by the hook.

In @.claude/skills/README.md:
- Around line 66-72: The fenced directory-structure block in README.md is
missing a language tag; update the opening fence for the snippet that starts
with "```" to include a language (e.g., "text") so markdown lint passes and
formatting stays consistent—locate the fenced block in .claude/skills/ README.md
(the directory-structure snippet) and change the opening fence to "```text".
🪄 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: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: a6614ec9-9801-4bec-b23f-7ba817c944fe

📥 Commits

Reviewing files that changed from the base of the PR and between d4894a9 and 1756d7b.

📒 Files selected for processing (22)
  • .claude/agents/README.md
  • .claude/agents/ci-agent.md
  • .claude/agents/docs-agent.md
  • .claude/agents/lint-agent.md
  • .claude/agents/security-agent.md
  • .claude/agents/test-agent.md
  • .claude/hooks/README.md
  • .claude/hooks/cleanup.sh
  • .claude/hooks/pre-edit.sh
  • .claude/hooks/stop-prek-validation.sh
  • .claude/settings.json
  • .claude/skills/README.md
  • .claude/skills/prow-ci/SKILL.md
  • .gitignore
  • .gitleaks.toml
  • .prek-version
  • CONTRIBUTING.md
  • DEVELOPMENT.md
  • TESTING.md
  • hack/ci.sh
  • hack/prek.ci.toml
  • prek.toml
💤 Files with no reviewable changes (1)
  • .gitignore
✅ Files skipped from review due to trivial changes (10)
  • .claude/hooks/cleanup.sh
  • .claude/agents/security-agent.md
  • .prek-version
  • .claude/agents/lint-agent.md
  • TESTING.md
  • .claude/agents/ci-agent.md
  • .claude/agents/test-agent.md
  • hack/ci.sh
  • CONTRIBUTING.md
  • DEVELOPMENT.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • .gitleaks.toml
  • prek.toml
  • hack/prek.ci.toml

Comment on lines +188 to +198
```
Updated: DEVELOPMENT.md
- Added section on new make target: go-bench
- Fixed typo in test commands
- Updated Go version requirement: 1.22.7 -> 1.24.0

Validated:
- All make targets exist and work
- All command examples tested
- Links checked
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a language tag to the fenced block.

This block is missing a language identifier, which triggers markdown lint and reduces readability.

Proposed fix
-```
+```text
 Updated: DEVELOPMENT.md
 - Added section on new make target: go-bench
 - Fixed typo in test commands
 - Updated Go version requirement: 1.22.7 -> 1.24.0
@@
 - All command examples tested
 - Links checked
</details>

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>

[warning] 188-188: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

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

In @.claude/agents/docs-agent.md around lines 188 - 198, The fenced code block
that begins with the lines "Updated: DEVELOPMENT.md" and the list of changes is
missing a language identifier after the opening triple backticks; add a language
tag (e.g., "text") immediately after the opening so the block readstext
and keep the rest of the content and the closing ``` unchanged to satisfy
markdown lint and improve readability.


</details>

<!-- fingerprinting:phantom:triton:hawk -->

<!-- This is an auto-generated comment by CodeRabbit -->

Comment thread .claude/hooks/pre-edit.sh
Comment on lines +18 to +27
# Normalize file path to be repo-relative for consistent pattern matching
# This ensures patterns like vendor/* work regardless of whether the input is absolute or relative
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo ".")
if [[ "$FILE" = /* ]]; then
# Convert absolute path to repo-relative
FILE="${FILE#"$REPO_ROOT"/}"
fi
# Strip leading ./
FILE="${FILE#./}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Path normalization is bypassable with ../ segments.

The current logic strips prefixes but doesn’t canonicalize. A traversal-style relative path can evade guardrail patterns (vendor/*, generated paths, high-risk matches).

Proposed fix
 REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo ".")
-if [[ "$FILE" = /* ]]; then
-  # Convert absolute path to repo-relative
-  FILE="${FILE#"$REPO_ROOT"/}"
-fi
-# Strip leading ./
-FILE="${FILE#./}"
+ABS_FILE=$(realpath -m "$FILE")
+ABS_ROOT=$(realpath -m "$REPO_ROOT")
+
+# Enforce repo boundary
+if [[ "$ABS_FILE" != "$ABS_ROOT/"* ]]; then
+  echo "❌ BLOCKED: File is outside repository: $FILE"
+  exit 1
+fi
+
+# Convert to canonical repo-relative path
+FILE="${ABS_FILE#"$ABS_ROOT"/}"

Based on learnings: high-risk guardrail/tooling changes require extra review.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Normalize file path to be repo-relative for consistent pattern matching
# This ensures patterns like vendor/* work regardless of whether the input is absolute or relative
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo ".")
if [[ "$FILE" = /* ]]; then
# Convert absolute path to repo-relative
FILE="${FILE#"$REPO_ROOT"/}"
fi
# Strip leading ./
FILE="${FILE#./}"
# Normalize file path to be repo-relative for consistent pattern matching
# This ensures patterns like vendor/* work regardless of whether the input is absolute or relative
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo ".")
ABS_FILE=$(realpath -m "$FILE")
ABS_ROOT=$(realpath -m "$REPO_ROOT")
# Enforce repo boundary
if [[ "$ABS_FILE" != "$ABS_ROOT/"* ]]; then
echo "❌ BLOCKED: File is outside repository: $FILE"
exit 1
fi
# Convert to canonical repo-relative path
FILE="${ABS_FILE#"$ABS_ROOT"/}"
🤖 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 @.claude/hooks/pre-edit.sh around lines 18 - 27, The path normalization
currently only strips prefixes and can be bypassed by "../" segments; update the
logic that sets REPO_ROOT and FILE so FILE is canonicalized and made
repo-relative (resolve symlinks and collapse ".." and "." segments) before
applying pattern checks. Specifically, after computing REPO_ROOT and before
stripping "./", replace the current FILE handling with a canonicalization step
(e.g., use realpath --canonicalize-missing or a small
python/os.path.realpath+relpath fallback) to compute FILE as the
repository-relative canonical path; keep the existing removal of a leading "./"
afterward. Ensure you adjust the code referencing REPO_ROOT and FILE so all
matching uses the canonical repo-relative FILE.

Comment thread .claude/hooks/README.md
Comment on lines +180 to +184
### Automatic Validation
Prek runs automatically:
- **On every turn**: Stop hook runs `prek run --all-files`
- **On commit**: Pre-commit hook runs relevant checks

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Automatic-validation command is documented incorrectly.

Line 182 says the Stop hook runs prek run --all-files, but the hook implementation uses prek run --config hack/prek.ci.toml. Please align this doc with the actual script behavior.

🤖 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 @.claude/hooks/README.md around lines 180 - 184, Update the "Automatic
Validation" docs so they match the hook implementation: change the Stop hook
command text from `prek run --all-files` to `prek run --config
hack/prek.ci.toml` (and verify or clarify the pre-commit hook description if
needed); specifically edit the "Automatic Validation" section that references
the Stop hook to reflect the actual `prek run --config hack/prek.ci.toml`
invocation used by the hook.

Comment thread .claude/skills/README.md
Comment on lines +66 to +72
```
.claude/skills/
├── README.md
└── skillname/
├── SKILL.md # Required: skill definition
└── reference/ # Optional: supporting docs
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a language tag to the directory-structure fenced block.

Use a language like text to satisfy markdown lint and keep formatting consistent.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 66-66: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 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 @.claude/skills/README.md around lines 66 - 72, The fenced
directory-structure block in README.md is missing a language tag; update the
opening fence for the snippet that starts with "```" to include a language
(e.g., "text") so markdown lint passes and formatting stays consistent—locate
the fenced block in .claude/skills/ README.md (the directory-structure snippet)
and change the opening fence to "```text".

@devppratik devppratik force-pushed the add-claude-and-docs branch from b0b2183 to 00ffd95 Compare May 29, 2026 18:43
- Add .claude/ directory with agents, hooks, and skills
- Add prek validation framework (prek.toml, hack/prek.ci.toml)
- Add gitleaks secret scanning (.gitleaks.toml)
- Add CONTRIBUTING.md, DEVELOPMENT.md, TESTING.md
- Add CLAUDE.md (if not already present)
- Add stop hook for automatic validation

Based on ocm-agent-operator PR openshift#257 (SREP-4410, SREP-4411)

Brings the repo up to Agentic SDLC contribution standard
@devppratik devppratik force-pushed the add-claude-and-docs branch from 00ffd95 to d91da99 Compare May 29, 2026 18:47
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 29, 2026

@devppratik: 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

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants