Skip to content

Add Сlaude Сode related entities#676

Merged
RomanNikitenko merged 8 commits intoche-incubator:mainfrom
RomanNikitenko:add-claude-code
Apr 10, 2026
Merged

Add Сlaude Сode related entities#676
RomanNikitenko merged 8 commits intoche-incubator:mainfrom
RomanNikitenko:add-claude-code

Conversation

@RomanNikitenko
Copy link
Copy Markdown
Collaborator

@RomanNikitenko RomanNikitenko commented Mar 31, 2026

What does this PR do?

  • adds CLAUDE.md file
  • adds add-rebase-rules skill
  • adds Google Cloud CLI to the Dev image - ability to install and use Claude Code for che-code development
  • adds command for Claude installation

What issues does this PR fix?

eclipse-che/che#23749

How to test this PR?

I was able to install and use Claude Code for che-code development on the dogfooding instance:

Screenshot 2026-04-01 at 20 22 29

Skill for adding a rebase rule was added within current PR.

To do it:

  • run Claude Code in the che-code
  • type add-rebase-rules
  • provide a commit that requires adding a rebase rule

I tested the skill for a real task within #646:

image

The result was:
image

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

Summary by CodeRabbit

  • Documentation

    • Added developer docs describing project architecture, build/test/workflow steps, container and launcher guidance.
    • Added documentation for a new Claude skill that automates creating and validating rebase rule files and records changelog entries.
  • Chores

    • Updated development container build: refreshed copyright year and added pinned Google Cloud CLI installation with build-time version verification.
    • Added a Devfile command to install the Claude CLI.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 31, 2026

Click here to review and test in web IDE: Contribute

@RomanNikitenko RomanNikitenko changed the title Add claude code Add Сlaude Сode related entities Mar 31, 2026
@github-actions
Copy link
Copy Markdown

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

@RomanNikitenko RomanNikitenko marked this pull request as ready for review April 1, 2026 17:25
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new Claude skill documentation at .claude/skills/add-rebase-rules/SKILL.md that, given a commit SHA or URL, resolves the commit, collects changed files, filters candidates, generates/updates .rebase/ rules (add, override, replace), inserts non-duplicate routing branches into rebase.sh, appends entries to .rebase/CHANGELOG.md, and runs validations (bash -n, jq, upstream from checks, Perl dry-run). Also adds top-level CLAUDE.md documentation and pins Google Cloud CLI in build/dockerfiles/dev.Dockerfile; adds a devfile command to install Claude CLI.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ClaudeSkill as ClaudeSkill
    participant Git
    participant FS as FileSystem
    participant Rebase as rebase.sh
    participant Upstream

    User->>ClaudeSkill: invoke (commit SHA or URL)
    ClaudeSkill->>Git: resolve SHA
    Git-->>ClaudeSkill: SHA
    ClaudeSkill->>Git: git show --name-only <SHA>
    Git-->>ClaudeSkill: changed files
    ClaudeSkill->>ClaudeSkill: filter candidates (include/exclude)
    loop per candidate
        ClaudeSkill->>FS: create/update .rebase/* rule files
    end
    ClaudeSkill->>Rebase: insert/update routing branches (non-duplicate)
    ClaudeSkill->>FS: append .rebase/CHANGELOG.md entry
    ClaudeSkill->>Upstream: validate (bash -n, jq, verify `from`, Perl dry-run)
    Upstream-->>ClaudeSkill: validation results
    ClaudeSkill-->>User: report generated/updated rules + validation summary
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • rgrunber
  • azatsarynnyy
  • vitaliy-guliy
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding Claude Code-related documentation, skills, and configuration files. It uses imperative mood and is concise at 32 characters.
Rebase Rules For Upstream Changes ✅ Passed No files under code/ directory (excluding code/extensions/che-*/** and **/package-lock.json) were modified in this PR.

✏️ 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.

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 the current code and only fix it if needed.

Inline comments:
In `@build/dockerfiles/dev.Dockerfile`:
- Around line 21-33: Pin the google-cloud-cli package to a specific tested
release by introducing a build ARG/ENV (e.g., GCLOUD_CLI_VERSION) and replace
the floating package install (google-cloud-cli) with the versioned package name
google-cloud-cli-${GCLOUD_CLI_VERSION}; ensure the Dockerfile declares the ARG
(or ENV) before the RUN that installs, document/update the build to pass a
GCLOUD_CLI_VERSION that is one of the 10 most recent releases in the repo, and
validate the chosen version during CI/build to avoid "package not found" errors.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dfce47d2-e3f8-41fd-b860-8df18cf151ca

📥 Commits

Reviewing files that changed from the base of the PR and between e76fa85 and 655b2f7.

📒 Files selected for processing (3)
  • .claude/skills/add-rebase-rules/SKILL.md
  • CLAUDE.md
  • build/dockerfiles/dev.Dockerfile

Comment thread build/dockerfiles/dev.Dockerfile Outdated
@sbouchet
Copy link
Copy Markdown
Collaborator

sbouchet commented Apr 2, 2026

@RomanNikitenko well done !
i've tested it for #677, works great !

@RomanNikitenko
Copy link
Copy Markdown
Collaborator Author

I tested add-rebase-rules skill for one more real-life task within current alignment with upstream to create rebase rules for commit RomanNikitenko@199009d
The skill successfully created rebase rules: RomanNikitenko@eb92105

Screenshot 2026-04-03 at 20 41 28

@RomanNikitenko
Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

✅ Actions performed

Full review triggered.

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/skills/add-rebase-rules/SKILL.md:
- Around line 69-71: Update the SKILL.md multiline routing guidance to
acknowledge that rebase.sh uses two different multiline
handlers—apply_changes_multi_line and apply_multi_line_replace—so developers
should not always default to apply_changes_multi_line; instead, inspect the
target file and match the existing handler pattern (e.g., use
apply_multi_line_replace for files already handled that way, and
apply_changes_multi_line where it’s used) to ensure generated rules route to the
correct function and avoid misrouted conflicts.

In `@CLAUDE.md`:
- Around line 88-89: The documentation entry for `.rebase/replace/` is
misleadingly described as "wholesale file replacement"; update the CLAUDE.md
wording for `.rebase/replace/` to state that the rebase flow uses per-file JSON
"from"/"by" replacement rules keyed by file path (not full file swaps), give a
short example sentence like "each entry is a JSON object with 'from' and 'by'
strings applied to the specified file path", and clarify that replacements are
applied per file path rather than replacing entire files.
- Around line 113-115: The docs step instructs fetching `upstream-code main`
which mismatches how rebase.sh resolves UPSTREAM_VERSION (it expects a release
ref like upstream-code/release/1.104); update CLAUDE.md to fetch the correct
upstream branch/ref that rebase.sh uses (e.g., `git fetch upstream-code
release/1.104` or the appropriate release branch), and ensure the example aligns
with the UPSTREAM_VERSION resolution in rebase.sh so the rebase can find the
release ref.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7d0e8616-fafb-4c52-8a93-5d8fc45e7e18

📥 Commits

Reviewing files that changed from the base of the PR and between e76fa85 and f2e4837.

📒 Files selected for processing (3)
  • .claude/skills/add-rebase-rules/SKILL.md
  • CLAUDE.md
  • build/dockerfiles/dev.Dockerfile

Comment thread .claude/skills/add-rebase-rules/SKILL.md
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Generated-by: Claude Code
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Generated-by: Cursor AI
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Generated-by: Cursor AI
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Generated-by: Cursor AI
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Generated-by: Cursor AI
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Generated-by: Cursor AI
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@devfile.yaml`:
- Around line 133-137: The "install-claude" exec command references a
non-existent component "tools" and also directly downloads+executes an unpinned
installer without checksum; update the "install-claude" command to target an
existing component (e.g., "dev" or "KUBEDOCK_ENABLED") and change the
commandLine to pull a pinned installer URL or tag and verify its SHA256 checksum
before executing (e.g., download a specific release/archive, compare its
checksum, then chmod+run only if the checksum matches); ensure you reference the
"install-claude" id so reviewers can find and validate the corrected component
name and added checksum verification step.
- Line 136: Replace the unpinned, unverifiable installer invocation in the
commandLine that downloads claude-install.sh with a pinned and verifiable
installation flow: pin the installer version passed to the installer (e.g., use
"bash -s 2.1.89" or "bash -s stable" when invoking claude-install.sh), download
the corresponding manifest.json and manifest.json.sig for that version, import
Anthropic's release GPG key and verify the sig with GPG, compute and compare the
installed binary's SHA256 against the manifest, and set DISABLE_AUTOUPDATER=1 to
prevent runtime drift; alternatively remove the installer step and download the
specific release binary directly instead of running claude-install.sh.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c850b77b-0d63-4e51-9c7a-4077ef76b228

📥 Commits

Reviewing files that changed from the base of the PR and between d35338d and 04c8f1c.

📒 Files selected for processing (1)
  • devfile.yaml

Comment thread devfile.yaml Outdated
Comment thread devfile.yaml Outdated
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Generated-by: Cursor AI
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

@RomanNikitenko RomanNikitenko merged commit 4a65dc1 into che-incubator:main Apr 10, 2026
13 checks passed
@RomanNikitenko RomanNikitenko deleted the add-claude-code branch April 10, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants