docs, feat(SREP-4460, SREP-4926: Add Standardized Claude hooks, skill, agents. Update standardised docs)#438
Conversation
|
Warning Review limit reached
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 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 configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (22)
WalkthroughThis 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. ChangesDeveloper Experience and CI Infrastructure
🎯 2 (Simple) | ⏱️ ~12 minutes Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning, 1 inconclusive)
✅ Passed checks (12 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: devppratik The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
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
📒 Files selected for processing (8)
.gitleaks.toml.prek-versionCONTRIBUTING.mdDEVELOPMENT.mdTESTING.mdhack/ci.shhack/prek.ci.tomlprek.toml
| paths = [ | ||
| '''test/fixtures/.*''', | ||
| '''test/deploy/.*''', | ||
| '''.*_test\.go''', | ||
| '''boilerplate/.*''', | ||
| '''vendor/.*''', | ||
| '''zz_generated\..*\.go''', | ||
| ] |
There was a problem hiding this comment.
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.
| 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.
| 1. **Setup**: Install Go 1.22.7+, operator-sdk v1.21.0 | ||
| 2. **Install tools**: `make tools` |
There was a problem hiding this comment.
🧩 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
fiRepository: openshift/pagerduty-operator
Length of output: 303
Align documented toolchain versions with repo config
go.modrequires Go1.25.0, butCONTRIBUTING.mdsays “Go 1.22.7+”; update the documented minimum (or thego.mod) to match.operator-sdk v1.21.0is 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.
|
|
||
| - [Testing Guide](./TESTING.md) | ||
| - [Design Documentation](./docs/design.md) | ||
| - [How to Test](./docs/how-to-test.md) | ||
| - [Operator SDK Docs](https://sdk.operatorframework.io/) |
There was a problem hiding this comment.
🧩 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.
| ### E2E Tests | ||
| - Full operator deployment | ||
| - Real cluster interaction | ||
| - Located in `test/e2e/` | ||
| - Run in CI via Tekton |
There was a problem hiding this comment.
🧩 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"
fiRepository: 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"
fiRepository: 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.
|
@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. DetailsIn response to this:
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 Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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:
|
|
/hold |
1756d7b to
b0b2183
Compare
There was a problem hiding this comment.
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
📒 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-versionCONTRIBUTING.mdDEVELOPMENT.mdTESTING.mdhack/ci.shhack/prek.ci.tomlprek.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
| ``` | ||
| 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 | ||
| ``` |
There was a problem hiding this comment.
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 -->
| # 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#./}" | ||
|
|
There was a problem hiding this comment.
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.
| # 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.
| ### Automatic Validation | ||
| Prek runs automatically: | ||
| - **On every turn**: Stop hook runs `prek run --all-files` | ||
| - **On commit**: Pre-commit hook runs relevant checks | ||
|
|
There was a problem hiding this comment.
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.
| ``` | ||
| .claude/skills/ | ||
| ├── README.md | ||
| └── skillname/ | ||
| ├── SKILL.md # Required: skill definition | ||
| └── reference/ # Optional: supporting docs | ||
| ``` |
There was a problem hiding this comment.
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".
b0b2183 to
00ffd95
Compare
- 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
00ffd95 to
d91da99
Compare
|
@devppratik: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
What type of PR is this?
docs/feature
What this PR does / why we need it?
Changes
New Infrastructure:
Validation:
Documentation:
References
Summary by CodeRabbit
Documentation
Chores