Skip to content

feat: add Kotlin, Android, and KMP rules, agent, skills, and command#345

Open
rezaiyan wants to merge 5 commits intoaffaan-m:mainfrom
rezaiyan:feat/android-kmp-support
Open

feat: add Kotlin, Android, and KMP rules, agent, skills, and command#345
rezaiyan wants to merge 5 commits intoaffaan-m:mainfrom
rezaiyan:feat/android-kmp-support

Conversation

@rezaiyan
Copy link

@rezaiyan rezaiyan commented Mar 6, 2026

Description

Add Kotlin, Android, and KMP (Kotlin Multiplatform) support with new rules, an agent, skills, and a command:

  • Rules: kotlin/coding-style.md, kotlin/patterns.md, kotlin/security.md, kotlin/testing.md — idiomatic Kotlin style, architecture patterns, security best practices,
    and testing guidelines
  • Agent: kotlin-reviewer.md — code reviewer for Kotlin/Android/KMP covering coroutine safety, Compose performance, and clean architecture
  • Skills: android-clean-architecture, compose-multiplatform-patterns, kotlin-coroutines-flows — detailed patterns for layered architecture, Compose UI, and
    coroutine/Flow usage
  • Command: gradle-build.md — incremental Gradle build error detection and fix workflow

Type of Change

  • fix: Bug fix
  • feat: New feature
  • refactor: Code refactoring
  • docs: Documentation
  • test: Tests
  • chore: Maintenance/tooling
  • ci: CI/CD changes

Checklist

  • Tests pass locally (node tests/run-all.js)
  • Validation scripts pass
  • Follows conventional commits format
  • Updated relevant documentation

Summary by cubic

Adds Kotlin, Android, and KMP support with focused rules, a Kotlin/Android/KMP review agent, three skills, and a Gradle build-fix command. Refines docs and examples, aligning UseCase naming with list/detail semantics and polishing guidance based on review feedback.

  • New Features

    • Rules: Kotlin coding style, patterns, security, testing.
    • Agent: kotlin-reviewer for Kotlin/Android/KMP (coroutines/Flow, Compose performance, clean architecture).
    • Skills: android-clean-architecture, compose-multiplatform-patterns, kotlin-coroutines-flows.
    • Command: gradle-build for incremental detection and fixing of Android/KMP Gradle and compilation errors.
  • Bug Fixes

    • Aligned UseCase names with list vs detail usage and updated ViewModel examples; copyedits from review.
    • Clarified KMP dispatcher/cancellation and WhileSubscribed guidance.
    • Strengthened Gradle build command guardrails and error grouping; polished Compose/navigation examples.

Written for commit 02d5450. Summary will update on new commits.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive Kotlin/Android guidance covering coding style, architectural patterns, security, testing, coroutines/Flow, Compose multiplatform patterns, and clean-architecture practices.
    • Added a Gradle build diagnostics guide for troubleshooting common Kotlin/Multiplatform build errors.
    • Introduced a structured Kotlin/Android code-review framework with role, workflow, checklists, report templates, and approval criteria.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 6, 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 multiple Kotlin/Android/KMP documentation artifacts: a Kotlin reviewer agent prompt, a Gradle/KMP build diagnostic guide, Kotlin rules for style/patterns/security/testing, and skill guides for clean architecture, Compose multiplatform, and coroutines/flows. No source code or public API changes.

Changes

Cohort / File(s) Summary
Agent & Build Guidance
agents/kotlin-reviewer.md, commands/gradle-build.md
New public Kotlin/Android/KMP reviewer prompt and a procedural Gradle/KMP build diagnostic & fix guide.
Kotlin Rules
rules/kotlin/coding-style.md, rules/kotlin/patterns.md, rules/kotlin/security.md, rules/kotlin/testing.md
Introduces Kotlin-specific coding style, architecture/patterns, security practices, and testing guidance with examples.
Skill Guides
skills/android-clean-architecture/SKILL.md, skills/compose-multiplatform-patterns/SKILL.md, skills/kotlin-coroutines-flows/SKILL.md
Adds skill-level guides on Clean Architecture, Compose Multiplatform patterns/performance, and Coroutines & Flow usage and testing.
Bulk Documentation Additions
...
Multiple documentation files added across agents, rules, commands, and skills; documentation-only changes, no code modifications.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • affaan-m

Poem

🐇 I hopped through docs where Kotlin blooms,
Coroutines danced in tidy rooms,
Compose and builds in careful tune,
Cleaner patterns by the moon,
A rabbit's clap — the codebase blooms.

🚥 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 accurately summarizes the main change: adding Kotlin, Android, and KMP support through rules, agent, skills, and command documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

9 issues found across 9 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="rules/kotlin/patterns.md">

<violation number="1" location="rules/kotlin/patterns.md:72">
P2: The UseCase example calls `repository.getAll(filter)`, but `ItemRepository` in this same document does not define `getAll`, making the guidance internally inconsistent and non-compilable.</violation>
</file>

<file name="skills/kotlin-coroutines-flows/SKILL.md">

<violation number="1" location="skills/kotlin-coroutines-flows/SKILL.md:128">
P2: The retry/backoff example references an undefined variable (`remainingAttempts`), so the snippet is not valid Kotlin.</violation>

<violation number="2" location="skills/kotlin-coroutines-flows/SKILL.md:188">
P3: The cancellation sample calls `ensureActive()` without a coroutine context/scope receiver, which makes the example incorrect as written.</violation>
</file>

<file name="skills/android-clean-architecture/SKILL.md">

<violation number="1" location="skills/android-clean-architecture/SKILL.md:112">
P2: `ItemRepositoryImpl` does not implement `saveItem`, so the example class does not satisfy the shown `ItemRepository` interface.</violation>

<violation number="2" location="skills/android-clean-architecture/SKILL.md:167">
P2: The examples query `category` even though `ItemEntity`/`Item` schema does not define a `category` field, so the documented Room/SQLDelight code is internally inconsistent and non-compilable as shown.</violation>
</file>

<file name="rules/kotlin/testing.md">

<violation number="1" location="rules/kotlin/testing.md:22">
P2: The sample test uses a `FakeItemRepository` constructor argument that the documented fake class does not define, so the example is non-compilable.</violation>

<violation number="2" location="rules/kotlin/testing.md:122">
P2: The source-set example mislabels `androidTest` as unit tests; this can route tests to the wrong test task/source set.</violation>
</file>

<file name="skills/compose-multiplatform-patterns/SKILL.md">

<violation number="1" location="skills/compose-multiplatform-patterns/SKILL.md:94">
P2: The Refresh event handler calls `loadItems()` without the required `query` argument, making the example inconsistent and non-compilable.</violation>

<violation number="2" location="skills/compose-multiplatform-patterns/SKILL.md:257">
P2: Using `remember` without keys inside a dynamic `forEach` can retain stale callbacks and dispatch clicks for the wrong item after list changes.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Contributor

@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

🧹 Nitpick comments (5)
rules/kotlin/coding-style.md (1)

8-8: Minor: Hyphenate compound adjective.

"Kotlin specific" should be "Kotlin-specific" when used as a compound adjective before a noun.

📝 Proposed fix
-> This file extends [common/coding-style.md](../common/coding-style.md) with Kotlin specific content.
+> This file extends [common/coding-style.md](../common/coding-style.md) with Kotlin-specific content.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@rules/kotlin/coding-style.md` at line 8, The phrase "Kotlin specific" in the
sentence "This file extends [common/coding-style.md](../common/coding-style.md)
with Kotlin specific content." should be hyphenated as "Kotlin-specific"
(compound adjective). Update the text in the rules/kotlin/coding-style.md file
to read "with Kotlin-specific content." ensuring only the compound adjective is
changed and no other wording is altered.
rules/kotlin/patterns.md (1)

8-8: Minor: Hyphenate compound adjective.

"Android/KMP specific" should be "Android/KMP-specific" when used as a compound adjective before a noun.

📝 Proposed fix
-> This file extends [common/patterns.md](../common/patterns.md) with Kotlin and Android/KMP specific content.
+> This file extends [common/patterns.md](../common/patterns.md) with Kotlin and Android/KMP-specific content.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@rules/kotlin/patterns.md` at line 8, Replace the compound adjective in the
sentence "This file extends [common/patterns.md](../common/patterns.md) with
Kotlin and Android/KMP specific content." by inserting a hyphen so it reads
"Android/KMP-specific" (i.e., change "Android/KMP specific content" to
"Android/KMP-specific content") to correctly hyphenate the compound adjective.
rules/kotlin/testing.md (1)

8-8: Minor: Hyphenate compound adjective.

"Kotlin and Android/KMP specific" should be "Kotlin and Android/KMP-specific" when used as a compound adjective before a noun.

📝 Proposed fix
-> This file extends [common/testing.md](../common/testing.md) with Kotlin and Android/KMP specific content.
+> This file extends [common/testing.md](../common/testing.md) with Kotlin and Android/KMP-specific content.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@rules/kotlin/testing.md` at line 8, Update the sentence "This file extends
[common/testing.md](../common/testing.md) with Kotlin and Android/KMP specific
content." to hyphenate the compound adjective by changing "Kotlin and
Android/KMP specific" to "Kotlin and Android/KMP-specific" so it reads "...with
Kotlin and Android/KMP-specific content."; modify the text in
rules/kotlin/testing.md where that sentence appears (look for the exact phrase
"Kotlin and Android/KMP specific") and replace it with the hyphenated form.
rules/kotlin/security.md (1)

8-8: Minor: Hyphenate compound adjective.

"Android/KMP specific" should be "Android/KMP-specific" when used as a compound adjective before a noun.

📝 Proposed fix
-> This file extends [common/security.md](../common/security.md) with Kotlin and Android/KMP specific content.
+> This file extends [common/security.md](../common/security.md) with Kotlin and Android/KMP-specific content.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@rules/kotlin/security.md` at line 8, Change the compound adjective
"Android/KMP specific" to a hyphenated form "Android/KMP-specific" in the
sentence "This file extends [common/security.md](../common/security.md) with
Kotlin and Android/KMP specific content." to make the compound adjective
grammatically correct; locate and replace that exact phrase in the
rules/kotlin/security.md content.
agents/kotlin-reviewer.md (1)

18-37: Add an explicit security review path.

The workflow and checklist never tell this agent to apply the Kotlin security guidance added in this PR or to escalate critical security findings, so Android/KMP-specific risks can fall through this reviewer entirely. Add a dedicated security section and a handoff step to security-reviewer when critical issues are found.

Based on learnings: "If a security issue is found, stop immediately and use the security-reviewer agent to fix CRITICAL issues before continuing."

Also applies to: 39-105

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

In `@agents/kotlin-reviewer.md` around lines 18 - 37, Add an explicit security
review path to the existing Workflow by inserting a new "Security Review" step
(e.g., "Step 2b: Security Review") in the agents/kotlin-reviewer workflow that
instructs the reviewer to run the Kotlin security guidance checks introduced in
this PR and to immediately stop and escalate to the security-reviewer agent on
any CRITICAL findings; update the checklist to include security-specific checks
(sensitive API usage, insecure crypto, manifest/exported components, keystore
handling) and add a clear handoff instruction that calls out the
security-reviewer agent name ("security-reviewer") and the condition ("on
CRITICAL issues") so reviewers know to transfer the PR for remediation before
continuing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@agents/kotlin-reviewer.md`:
- Around line 122-141: Update the review template so HIGH findings are treated
as merge-blocking: modify the "Review Summary" table and the "Approval Criteria"
section (the headings "## Review Summary" and "## Approval Criteria") to make
any HIGH > 0 map to a BLOCK/FAIL status and adjust the verdict text from
"WARNING — 1 HIGH issue should be resolved before merge." to a blocking verdict
(e.g., "BLOCK — HIGH issues must be fixed before merge."); also update the
approval rules bullet so "Approve" requires no HIGH or CRITICAL issues and
"Block" includes HIGH and CRITICAL findings.

In `@skills/android-clean-architecture/SKILL.md`:
- Around line 180-199: The SQL schema for ItemEntity is missing the category
column referenced by the getByCategory query; update the CREATE TABLE for
ItemEntity to include a category TEXT NOT NULL column, then update the upsert
INSERT OR REPLACE statement and its VALUES to include the category parameter
(and ensure any observeAll/selects still work), and verify getByCategory uses
the correct column name; look for symbols ItemEntity, getByCategory, upsert, and
observeAll to make these edits consistently.
- Around line 165-175: The DAO query references a non-existent column: update
either the ItemEntity model or the DAO; specifically, add a category
field/column to the ItemEntity data class/entity (so it matches the WHERE
category = :category in ItemDao.getByCategory and the items accepted by
ItemDao.upsert/observeAll) or change getByCategory to filter by an existing
column name; ensure the Room `@ColumnInfo` (or property name) matches "category"
and that the entity's schema and DAO methods (ItemDao.getByCategory, upsert,
observeAll) are consistent.

In `@skills/kotlin-coroutines-flows/SKILL.md`:
- Around line 126-131: The retry predicate in fetchWithRetry uses a non-existent
remainingAttempts; replace the .retry { ... } usage with .retryWhen { cause,
attempt -> ... } in the fetchWithRetry Flow so you can compute exponential
backoff from the attempt parameter (or maintain an external attempt counter),
check the exception type (cause is IOException) and delay using a backoff
formula (e.g., baseDelay * (1 shl (attempt.toInt() - 1))) before returning true
to retry, otherwise return false to stop retrying; update the logic in the
fetchWithRetry function accordingly.

---

Nitpick comments:
In `@agents/kotlin-reviewer.md`:
- Around line 18-37: Add an explicit security review path to the existing
Workflow by inserting a new "Security Review" step (e.g., "Step 2b: Security
Review") in the agents/kotlin-reviewer workflow that instructs the reviewer to
run the Kotlin security guidance checks introduced in this PR and to immediately
stop and escalate to the security-reviewer agent on any CRITICAL findings;
update the checklist to include security-specific checks (sensitive API usage,
insecure crypto, manifest/exported components, keystore handling) and add a
clear handoff instruction that calls out the security-reviewer agent name
("security-reviewer") and the condition ("on CRITICAL issues") so reviewers know
to transfer the PR for remediation before continuing.

In `@rules/kotlin/coding-style.md`:
- Line 8: The phrase "Kotlin specific" in the sentence "This file extends
[common/coding-style.md](../common/coding-style.md) with Kotlin specific
content." should be hyphenated as "Kotlin-specific" (compound adjective). Update
the text in the rules/kotlin/coding-style.md file to read "with Kotlin-specific
content." ensuring only the compound adjective is changed and no other wording
is altered.

In `@rules/kotlin/patterns.md`:
- Line 8: Replace the compound adjective in the sentence "This file extends
[common/patterns.md](../common/patterns.md) with Kotlin and Android/KMP specific
content." by inserting a hyphen so it reads "Android/KMP-specific" (i.e., change
"Android/KMP specific content" to "Android/KMP-specific content") to correctly
hyphenate the compound adjective.

In `@rules/kotlin/security.md`:
- Line 8: Change the compound adjective "Android/KMP specific" to a hyphenated
form "Android/KMP-specific" in the sentence "This file extends
[common/security.md](../common/security.md) with Kotlin and Android/KMP specific
content." to make the compound adjective grammatically correct; locate and
replace that exact phrase in the rules/kotlin/security.md content.

In `@rules/kotlin/testing.md`:
- Line 8: Update the sentence "This file extends
[common/testing.md](../common/testing.md) with Kotlin and Android/KMP specific
content." to hyphenate the compound adjective by changing "Kotlin and
Android/KMP specific" to "Kotlin and Android/KMP-specific" so it reads "...with
Kotlin and Android/KMP-specific content."; modify the text in
rules/kotlin/testing.md where that sentence appears (look for the exact phrase
"Kotlin and Android/KMP specific") and replace it with the hyphenated form.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 02ad91df-3cd6-4c93-b15a-edc9e08735cb

📥 Commits

Reviewing files that changed from the base of the PR and between 03b3e0d and f0e0cb8.

📒 Files selected for processing (9)
  • agents/kotlin-reviewer.md
  • commands/gradle-build.md
  • rules/kotlin/coding-style.md
  • rules/kotlin/patterns.md
  • rules/kotlin/security.md
  • rules/kotlin/testing.md
  • skills/android-clean-architecture/SKILL.md
  • skills/compose-multiplatform-patterns/SKILL.md
  • skills/kotlin-coroutines-flows/SKILL.md

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 6 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="rules/kotlin/patterns.md">

<violation number="1" location="rules/kotlin/patterns.md:71">
P3: The use case is still named `GetItemsUseCase`, but the new method signature returns a single `Item` by id. Rename the class to `GetItemUseCase` or keep the original list-returning signature so the example’s responsibility is clear.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Contributor

@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.

🧹 Nitpick comments (2)
rules/kotlin/testing.md (1)

8-8: Consider hyphenating compound adjective.

"Android/KMP specific" should be "Android/KMP-specific" when used as a compound adjective modifying "content."

📝 Proposed style fix
-> This file extends [common/testing.md](../common/testing.md) with Kotlin and Android/KMP specific content.
+> This file extends [common/testing.md](../common/testing.md) with Kotlin and Android/KMP-specific content.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@rules/kotlin/testing.md` at line 8, The phrase "Android/KMP specific" in the
sentence "This file extends [common/testing.md](../common/testing.md) with
Kotlin and Android/KMP specific content." should be hyphenated as a compound
adjective; change "Android/KMP specific" to "Android/KMP-specific" so the
sentence reads "...with Kotlin and Android/KMP-specific content."
rules/kotlin/patterns.md (1)

8-8: Consider hyphenating compound adjective.

"Android/KMP specific" should be "Android/KMP-specific" when used as a compound adjective modifying "content."

📝 Proposed style fix
-> This file extends [common/patterns.md](../common/patterns.md) with Kotlin and Android/KMP specific content.
+> This file extends [common/patterns.md](../common/patterns.md) with Kotlin and Android/KMP-specific content.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@rules/kotlin/patterns.md` at line 8, Change the phrase "Android/KMP specific"
in the sentence "This file extends [common/patterns.md](../common/patterns.md)
with Kotlin and Android/KMP specific content." to use a hyphenated compound
adjective, i.e., "Android/KMP-specific", so the sentence reads with correct
compound-adjective punctuation; update the text in the rules/kotlin/patterns.md
document accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@rules/kotlin/patterns.md`:
- Line 8: Change the phrase "Android/KMP specific" in the sentence "This file
extends [common/patterns.md](../common/patterns.md) with Kotlin and Android/KMP
specific content." to use a hyphenated compound adjective, i.e.,
"Android/KMP-specific", so the sentence reads with correct compound-adjective
punctuation; update the text in the rules/kotlin/patterns.md document
accordingly.

In `@rules/kotlin/testing.md`:
- Line 8: The phrase "Android/KMP specific" in the sentence "This file extends
[common/testing.md](../common/testing.md) with Kotlin and Android/KMP specific
content." should be hyphenated as a compound adjective; change "Android/KMP
specific" to "Android/KMP-specific" so the sentence reads "...with Kotlin and
Android/KMP-specific content."

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b0fc1bd3-a8af-4a12-b4a3-624a66afd97d

📥 Commits

Reviewing files that changed from the base of the PR and between f0e0cb8 and 39e584c.

📒 Files selected for processing (6)
  • agents/kotlin-reviewer.md
  • rules/kotlin/patterns.md
  • rules/kotlin/testing.md
  • skills/android-clean-architecture/SKILL.md
  • skills/compose-multiplatform-patterns/SKILL.md
  • skills/kotlin-coroutines-flows/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • skills/kotlin-coroutines-flows/SKILL.md
  • skills/android-clean-architecture/SKILL.md
  • skills/compose-multiplatform-patterns/SKILL.md

Copy link
Owner

@affaan-m affaan-m left a comment

Choose a reason for hiding this comment

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

Automated review: waiting for checks to complete.

Copy link
Contributor

@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

🧹 Nitpick comments (1)
rules/kotlin/patterns.md (1)

8-8: Hyphenate the compound modifier.

Line 8 reads more cleanly as Android/KMP-specific content.

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

In `@rules/kotlin/patterns.md` at line 8, Update the sentence "This file extends
[common/patterns.md](../common/patterns.md) with Kotlin and Android/KMP specific
content." to hyphenate the compound modifier so it reads "Android/KMP-specific
content"; find the exact string in rules/kotlin/patterns.md and replace the
unhyphenated form with the hyphenated form to improve readability.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@rules/kotlin/patterns.md`:
- Line 18: The DI, ViewModel, and UseCase examples use mismatched names
(GetItemsUseCase vs GetItemUseCase); pick the canonical use-case name (e.g.,
GetItemUseCase) and update all occurrences so they match: change the factory
line factory { GetItemsUseCase(get()) } and any other references in the DI and
ViewModel snippets to the exact identifier defined in the UseCase section
(GetItemUseCase) to ensure consistency across examples.
- Around line 91-100: The two block-bodied `get` functions in the
`SecureStorage` class lack return statements despite declaring `String?` return
types; update each `actual fun get(key: String): String? { /* ... */ }` to
either use an expression body (e.g. `= ...`) or add an explicit `return` (for
example `return null` or the appropriate value) so the function body matches its
declared return type; similarly ensure any other block-bodied functions with
non-Unit return types (e.g., the `get` implementations shown) are corrected to
use expression bodies or explicit returns.
- Around line 106-108: Update the `stateIn` guidance to show the correct
signature and usage: mention that `stateIn` requires a CoroutineScope, a
SharingStarted policy and an initial value, and show the policy as
`SharingStarted.WhileSubscribed(5_000)` instead of `WhileSubscribed(5_000)`;
reference the symbols `stateIn`, `CoroutineScope`,
`SharingStarted.WhileSubscribed`, and “initial value” so readers know to call
e.g. `flow.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5_000),
initialValue)` (replace `viewModelScope` and `initialValue` with the appropriate
scope/value in your example).

---

Nitpick comments:
In `@rules/kotlin/patterns.md`:
- Line 8: Update the sentence "This file extends
[common/patterns.md](../common/patterns.md) with Kotlin and Android/KMP specific
content." to hyphenate the compound modifier so it reads "Android/KMP-specific
content"; find the exact string in rules/kotlin/patterns.md and replace the
unhyphenated form with the hyphenated form to improve readability.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e03fce02-9600-4617-8699-1d2fd2f9a877

📥 Commits

Reviewing files that changed from the base of the PR and between 39e584c and 6d12aa3.

📒 Files selected for processing (1)
  • rules/kotlin/patterns.md

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 4 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="rules/kotlin/patterns.md">

<violation number="1" location="rules/kotlin/patterns.md:25">
P2: Semantic mismatch: `ItemListViewModel` (a list screen) is injected with `GetItemUseCase`, which fetches a single item by ID. A list ViewModel would typically depend on a use case that returns a collection. Since this is a documentation example developers will copy, consider either renaming the ViewModel (e.g., `ItemDetailViewModel`) or keeping the original plural `GetItemsUseCase` in the DI snippets while keeping the singular `GetItemUseCase` in the UseCase Pattern section.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Contributor

@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.

🧹 Nitpick comments (2)
rules/kotlin/testing.md (1)

8-8: Optional: Consider hyphenating the compound adjective.

"Android/KMP specific" can be written as "Android/KMP-specific" to follow the style convention of hyphenating compound adjectives that precede a noun.

✏️ Suggested styling fix
-> This file extends [common/testing.md](../common/testing.md) with Kotlin and Android/KMP specific content.
+> This file extends [common/testing.md](../common/testing.md) with Kotlin and Android/KMP-specific content.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@rules/kotlin/testing.md` at line 8, Update the sentence "This file extends
[common/testing.md](../common/testing.md) with Kotlin and Android/KMP specific
content." to hyphenate the compound adjective so it reads "Kotlin and
Android/KMP-specific content"; edit the text in rules/kotlin/testing.md
accordingly to use "Android/KMP-specific".
rules/kotlin/patterns.md (1)

8-8: Optional: Consider hyphenating the compound adjective.

"Android/KMP specific" can be written as "Android/KMP-specific" to follow the style convention of hyphenating compound adjectives that precede a noun.

✏️ Suggested styling fix
-> This file extends [common/patterns.md](../common/patterns.md) with Kotlin and Android/KMP specific content.
+> This file extends [common/patterns.md](../common/patterns.md) with Kotlin and Android/KMP-specific content.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@rules/kotlin/patterns.md` at line 8, Update the phrase "Android/KMP specific"
to the hyphenated compound adjective form "Android/KMP-specific" in the sentence
that extends common/patterns.md (the line containing "This file extends
[common/patterns.md](../common/patterns.md) with Android/KMP specific
content."), so the wording follows compound-adjective style rules.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@rules/kotlin/patterns.md`:
- Line 8: Update the phrase "Android/KMP specific" to the hyphenated compound
adjective form "Android/KMP-specific" in the sentence that extends
common/patterns.md (the line containing "This file extends
[common/patterns.md](../common/patterns.md) with Android/KMP specific
content."), so the wording follows compound-adjective style rules.

In `@rules/kotlin/testing.md`:
- Line 8: Update the sentence "This file extends
[common/testing.md](../common/testing.md) with Kotlin and Android/KMP specific
content." to hyphenate the compound adjective so it reads "Kotlin and
Android/KMP-specific content"; edit the text in rules/kotlin/testing.md
accordingly to use "Android/KMP-specific".

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 255ee31a-eb85-4fce-9add-1a239613f075

📥 Commits

Reviewing files that changed from the base of the PR and between 6d12aa3 and 5e1a8be.

📒 Files selected for processing (4)
  • rules/kotlin/patterns.md
  • rules/kotlin/testing.md
  • skills/compose-multiplatform-patterns/SKILL.md
  • skills/kotlin-coroutines-flows/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/compose-multiplatform-patterns/SKILL.md

Copy link
Contributor

@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 `@skills/compose-multiplatform-patterns/SKILL.md`:
- Around line 1-5: The file name violates the project's lowercase naming
rule—rename skills/compose-multiplatform-patterns/SKILL.md to
skills/compose-multiplatform-patterns/skill.md and update any references (docs
index, README, or tooling that references SKILL.md) to the new lowercase name to
ensure consistency with the "{agents,skills,commands,hooks}/**/*.{md,json}"
convention; verify CI and any links still resolve after the rename.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 190e1b1b-d9b3-41f3-b963-87e046e722c8

📥 Commits

Reviewing files that changed from the base of the PR and between 5e1a8be and 02d5450.

📒 Files selected for processing (4)
  • rules/kotlin/patterns.md
  • rules/kotlin/testing.md
  • skills/compose-multiplatform-patterns/SKILL.md
  • skills/kotlin-coroutines-flows/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/kotlin-coroutines-flows/SKILL.md

Comment on lines +1 to +5
---
name: compose-multiplatform-patterns
description: Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.
origin: ECC
---
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Rename file to lowercase to comply with project naming conventions.

The filename SKILL.md should be skill.md to align with the project's coding guidelines for files in the skills directory. Since this is a new file, renaming it now ensures consistency across the codebase.

📝 Suggested file rename

Rename skills/compose-multiplatform-patterns/SKILL.md to skills/compose-multiplatform-patterns/skill.md

As per coding guidelines: "{agents,skills,commands,hooks}/**/*.{md,json}: Use lowercase with hyphens for file naming."

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

In `@skills/compose-multiplatform-patterns/SKILL.md` around lines 1 - 5, The file
name violates the project's lowercase naming rule—rename
skills/compose-multiplatform-patterns/SKILL.md to
skills/compose-multiplatform-patterns/skill.md and update any references (docs
index, README, or tooling that references SKILL.md) to the new lowercase name to
ensure consistency with the "{agents,skills,commands,hooks}/**/*.{md,json}"
convention; verify CI and any links still resolve after the rename.

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.

2 participants