Skip to content

improve skill - #691

Merged
ozgunozerk merged 2 commits into
mainfrom
improve-skill
May 4, 2026
Merged

ozgunozerk merged 2 commits into
mainfrom
improve-skill

Conversation

@ozgunozerk

@ozgunozerk ozgunozerk commented May 4, 2026 •

Copy link
Copy Markdown
Collaborator

PR Checklist

  • Tests
  • Documentation

Summary by CodeRabbit

Release Notes

  • Documentation
    • Updated code quality review workflow to compare files against established rules and similar codebase patterns.
    • Redesigned action-selection with new approval options: "Apply all," "One-by-one," and "Report only."
    • Enhanced inline documentation requirements for trait methods and functions.
    • Strengthened keyword usage guidelines in code and documentation.

@coderabbitai

coderabbitai Bot commented May 4, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3844d7c6-46ab-4f55-b9bd-ee19a3707b83

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Updates the code-quality skill to compare reviewed files against both codified rules and sibling files as ground truth, refines action-selection options, requires full file reads before rule checks, tightens the super keyword rule to include documentation, and adds a documentation-style rule for specific file types.

Changes

Code Quality Skill Workflow Update

Layer / File(s) Summary
Workflow Requirements
.claude/skills/code-quality.md (lines 65–67)
Adds explicit requirement to read every scoped file in full before checking rules to avoid partial reviews.
Finding Detection
.claude/skills/code-quality.md (lines 68–92)
Updates violation identification to compare each reviewed .rs file against both codified Rules and the closest sibling file in the repo (read in full), recording findings as rule:<rule-name> or discrepancy:<reference-file-path>.
Finding Format
.claude/skills/code-quality.md (lines 93–101)
Defines the new finding structure with kind field (rule: or discrepancy:), file path, line number, finding description, and fix.
Action Selection
.claude/skills/code-quality.md (lines 102–122)
Replaces Apply subset option with Apply all, One-by-one, and Report only action choices; preserves early-exit behavior when no violations or discrepancies are found.
Rule Updates & Additions
.claude/skills/code-quality.md (lines 288–291, 470–472)
Tightens super keyword rule to forbid super in both code and inline documentation; adds new rule requiring rigid inline documentation style for trait methods in mod.rs and functions in storage.rs (with packages/tokens/src/fungible as example).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

  • Library conventions #689: Original PR that introduced the code-quality.md skill; this PR refines and tightens the same skill's workflow, rules, and documentation requirements.

Suggested reviewers

  • brozorec

Poem

🐰 A rabbit hops through code so fine,
Comparing rules and siblings' lines,
No super sneaks in prose or doc,
Each file is read—no partial talk,
Apply with care, or report with grace! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete, containing only the template structure with no actual narrative explaining the changes, objectives, or context. Add a detailed description explaining what was changed in the skill's review workflow, why these changes improve code quality, and complete the PR checklist items.
Title check ❓ Inconclusive The title 'improve skill' is vague and does not clearly describe the specific changes made to the codebase. Replace with a more descriptive title that specifies the main change, such as 'Enhance code-quality skill with improved review workflow and documentation rules'.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve-skill

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
.claude/skills/code-quality.md (1)

70-91: 💤 Low value

Consider adding more structured guidance for sibling selection.

The instruction to "judge by context and relevancy" when picking a sibling file is somewhat subjective and could lead to inconsistent choices across different reviews. While the fallback to packages/tokens/src/fungible is helpful, adding a more algorithmic approach might improve consistency.

For example, you could suggest:

  1. First, identify the module category (token, access, governance, etc.)
  2. Then, match file type (mod.rs → mod.rs, storage.rs → storage.rs)
  3. Finally, pick the most similar within that category

This would make the sibling-selection process more deterministic.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/code-quality.md around lines 70 - 91, The sibling-selection
guidance is too subjective; update the text in the "Walk the file set against
two reference points" section to include a deterministic, stepwise algorithm for
choosing a sibling: (1) identify the module category (e.g., token, access,
governance), (2) match file type (mod.rs → mod.rs, storage.rs → storage.rs,
test.rs → test.rs), and (3) within that category pick the most similar file by
functionality and public API surface; keep the existing fallback to
packages/tokens/src/fungible but present it as the final fallback and add a
brief sentence that callers should document why a sibling was chosen when it
isn’t the closest match.
🤖 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/code-quality.md:
- Line 291: In the rule text that currently reads "`super` keyword is frowned
upon and should be avoided for the sake of full concrete path, both in code and
in inline documentations. Use the full path always instead of `super`.", replace
"inline documentations" with "inline documentation" so the sentence reads
"...both in code and in inline documentation." — locate this string in the
.claude/skills/code-quality.md content and update it accordingly.
- Line 470: Change the verb in the sentence "Trait methods in `mod.rs`, and
functions in `storage.rs` needs to have a" to use the plural verb "need" (i.e.,
replace "needs" with "need") so the subject-verb agreement is correct for the
compound subject "Trait methods... and functions...".

---

Nitpick comments:
In @.claude/skills/code-quality.md:
- Around line 70-91: The sibling-selection guidance is too subjective; update
the text in the "Walk the file set against two reference points" section to
include a deterministic, stepwise algorithm for choosing a sibling: (1) identify
the module category (e.g., token, access, governance), (2) match file type
(mod.rs → mod.rs, storage.rs → storage.rs, test.rs → test.rs), and (3) within
that category pick the most similar file by functionality and public API
surface; keep the existing fallback to packages/tokens/src/fungible but present
it as the final fallback and add a brief sentence that callers should document
why a sibling was chosen when it isn’t the closest match.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 336cbecd-26dc-41ac-b8ce-ffc6a208e742

📥 Commits

Reviewing files that changed from the base of the PR and between c5c86c4 and 76defce.

📒 Files selected for processing (1)
  • .claude/skills/code-quality.md

Comment thread .claude/skills/code-quality.md Resolved
Comment thread .claude/skills/code-quality.md Resolved
@ozgunozerk
ozgunozerk merged commit 7cf6d20 into main May 4, 2026
3 checks passed
@ozgunozerk
ozgunozerk deleted the improve-skill branch May 4, 2026 11:21
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.

1 participant