Add missing CLI flags, extraArgs passthrough, and version tracking#70
Add missing CLI flags, extraArgs passthrough, and version tracking#70ClankerGuru wants to merge 6 commits into
Conversation
… all agent wrappers Codex: +6 flags (--skip-git-repo-check, --ephemeral, --output-schema, --color, --json, --output-last-message) OpenCode: +10 flags (--command, --share, --format, --file, --title, --attach, --password, --dir, --variant, --thinking) Claude: +5 flags (--allow-dangerously-skip-permissions, --chrome, --no-chrome, --ide, --replay-user-messages) All 4 agents: +extraArgs passthrough for future-proofing, version tasks show wrapper compatibility
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 12 minutes and 33 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (15)
📝 WalkthroughWalkthroughAdded passthrough support for unmapped CLI flags across Claude, Codex, Copilot, and Opencode by introducing new Gradle task inputs (notably Changes
Sequence Diagram(s)sequenceDiagram
participant Project as Project (Gradle)
participant Task as RunTask (Gradle Task)
participant CLI as Assistant CLI
participant Logger as Gradle Logger
Project->>Task: set properties (flags, extraArgs via -P)
Task->>Task: build command (base + conditional flags + extraArgs)
Task->>CLI: exec constructed command
CLI-->>Task: exit / output
Task->>Logger: log wrapper version / lifecycle message
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
plugin/opencode/src/main/kotlin/zone/clanker/opencode/OpencodePlugin.kt (1)
363-388:⚠️ Potential issue | 🟠 Major
fileAttachmentsis never populated from Gradle properties.
OpencodeRunTasksupportsfileAttachments(Line 39 / Line 69), but no binding is set in theopencode-runtask configuration block. As written,--filecannot be supplied via mapped property and only works throughextraArgs.Suggested fix
prop("format")?.let { t.format.set(it) } + (prop("fileAttachments") ?: prop("file"))?.let { + t.fileAttachments.set( + it.split(",") + .map(String::trim) + .filter(String::isNotEmpty) + ) + } prop("title")?.let { t.title.set(it) } prop("attach")?.let { t.attach.set(it) } prop("password")?.let { t.password.set(it) } prop("dir")?.let { t.dir.set(it) } prop("variant")?.let { t.variant.set(it) } if (project.hasProperty("thinking")) t.thinking.set(true) - prop("extraArgs")?.let { t.extraArgs.set(it.split(",")) } + prop("extraArgs")?.let { + t.extraArgs.set( + it.split(",") + .map(String::trim) + .filter(String::isNotEmpty) + ) + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugin/opencode/src/main/kotlin/zone/clanker/opencode/OpencodePlugin.kt` around lines 363 - 388, The opencode-run task configuration never maps the Gradle property for file attachments into the OpencodeRunTask; update the task registration block that configures OpencodeRunTask so it reads the "fileAttachments" property (using the same prop(...) helper used elsewhere) and sets t.fileAttachments appropriately (e.g., split a comma-separated string into a list or whatever type OpencodeRunTask.fileAttachments expects) so the task's fileAttachments field is populated from Gradle properties rather than requiring extraArgs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@plugin/claude/src/main/kotlin/zone/clanker/claude/ClaudePlugin.kt`:
- Line 323: Normalize the parsed extraArgs in ClaudePlugin.kt: in the
prop("extraArgs")?.let { ... } block, trim each value produced by splitting on
"," and filter out any empty/blank entries before calling t.extraArgs.set(...),
so t.extraArgs only receives non-empty, trimmed arguments.
- Around line 101-103: The current flag-building in ClaudePlugin.kt may append
both "--chrome" and "--no-chrome" when chrome and noChrome are both true; update
the logic in the method that builds cmd (referencing the chrome and noChrome
Optionals and the cmd collection) to detect this conflict and handle it
deterministically — either throw an IllegalArgumentException (with a clear
message about mutually exclusive flags) or choose a single precedence (e.g.,
prefer noChrome) and only append that flag; ensure only one of "--chrome" or
"--no-chrome" can ever be added to cmd.
In `@plugin/codex/src/main/kotlin/zone/clanker/codex/CodexPlugin.kt`:
- Line 306: The current parsing of prop("extraArgs") in CodexPlugin.kt sets
t.extraArgs from split(",") but doesn't trim entries or remove empty strings;
update the parsing so that after splitting you map each item to its trimmed
value and filter out blank/empty items before calling t.extraArgs.set. Locate
the prop("extraArgs") usage (the line that calls t.extraArgs.set) and replace
the split result with a trimmed-and-filtered list to ensure no malformed command
arguments are produced.
In `@plugin/copilot/src/main/kotlin/zone/clanker/copilot/CopilotPlugin.kt`:
- Line 306: The current assignment to extraArgs uses raw it.split(",") which
preserves whitespace and empty tokens; update the handling where
prop("extraArgs") is processed (the block that calls t.extraArgs.set) to split
on commas, trim each token and filter out empty strings before setting so only
normalized, non-empty CLI arguments are stored (e.g., map each part with trim()
and filter isNotEmpty()).
---
Outside diff comments:
In `@plugin/opencode/src/main/kotlin/zone/clanker/opencode/OpencodePlugin.kt`:
- Around line 363-388: The opencode-run task configuration never maps the Gradle
property for file attachments into the OpencodeRunTask; update the task
registration block that configures OpencodeRunTask so it reads the
"fileAttachments" property (using the same prop(...) helper used elsewhere) and
sets t.fileAttachments appropriately (e.g., split a comma-separated string into
a list or whatever type OpencodeRunTask.fileAttachments expects) so the task's
fileAttachments field is populated from Gradle properties rather than requiring
extraArgs.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: b3742771-61e2-4767-a8eb-4b79814dd11c
📒 Files selected for processing (8)
lib/generators/src/main/resources/templates/skills/claude-tasks.mdlib/generators/src/main/resources/templates/skills/codex-tasks.mdlib/generators/src/main/resources/templates/skills/copilot-tasks.mdlib/generators/src/main/resources/templates/skills/opencode-tasks.mdplugin/claude/src/main/kotlin/zone/clanker/claude/ClaudePlugin.ktplugin/codex/src/main/kotlin/zone/clanker/codex/CodexPlugin.ktplugin/copilot/src/main/kotlin/zone/clanker/copilot/CopilotPlugin.ktplugin/opencode/src/main/kotlin/zone/clanker/opencode/OpencodePlugin.kt
The propose skill now requires presenting options at every design fork and waiting for the user to choose before proceeding. No more writing full proposals without checking in on naming, architecture, phasing, and tooling decisions.
There was a problem hiding this comment.
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 `@lib/generators/src/main/resources/templates/skills/propose.md`:
- Line 35: Update the template instruction in propose.md to use the canonical
TaskStatus enum value by changing the status example from the lowercase string
"done" to the uppercase enum constant DONE so generated `.opsx.yaml` entries are
valid; look for the line that currently reads "Update `.opsx.yaml` status to
`done` after each" and replace the lowercase token with `DONE` (or otherwise
reference the TaskStatus.DONE enum) to ensure conformity with the expected
status values.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9ee4941e-a90a-451d-8479-5a661d58becd
📒 Files selected for processing (1)
lib/generators/src/main/resources/templates/skills/propose.md
|
|
||
| 4. **Create the change**: `./gradlew opsx-propose --name=<name>` | ||
|
|
||
| 5. **Create artifacts in order**: proposal.md → design.md → tasks.md. Update `.opsx.yaml` status to `done` after each. |
There was a problem hiding this comment.
Use canonical TaskStatus value (DONE), not lowercase done.
The template currently instructs users to set .opsx.yaml status to done, but valid statuses are uppercase enum values. This will produce invalid status entries.
Suggested fix
-5. **Create artifacts in order**: proposal.md → design.md → tasks.md. Update `.opsx.yaml` status to `done` after each.
+5. **Create artifacts in order**: proposal.md → design.md → tasks.md. Update `.opsx.yaml` status to `DONE` after each.📝 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.
| 5. **Create artifacts in order**: proposal.md → design.md → tasks.md. Update `.opsx.yaml` status to `done` after each. | |
| 5. **Create artifacts in order**: proposal.md → design.md → tasks.md. Update `.opsx.yaml` status to `DONE` after each. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@lib/generators/src/main/resources/templates/skills/propose.md` at line 35,
Update the template instruction in propose.md to use the canonical TaskStatus
enum value by changing the status example from the lowercase string "done" to
the uppercase enum constant DONE so generated `.opsx.yaml` entries are valid;
look for the line that currently reads "Update `.opsx.yaml` status to `done`
after each" and replace the lowercase token with `DONE` (or otherwise reference
the TaskStatus.DONE enum) to ensure conformity with the expected status values.
…opilot
opsx-install was generating a stale single init script with directory-level
symlinks. Rewrote to generate the numbered split (00-wrkx, 01-srcx, 02-opsx,
03-{agent}) matching install.sh output.
Also changed default agents from claude-only to claude+copilot across:
- install.sh (piped non-interactive default)
- InstallGlobalTask (gradle.properties default)
- All 4 agent plugin fallbacks
The install script now reads from /dev/tty instead of stdin, so the interactive prompt works even when piped via curl | bash. Falls back to claude+copilot default when no terminal is available (CI).
- Make --chrome and --no-chrome mutually exclusive (else-if) - Trim and filter empty strings from extraArgs split on all 4 plugins
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
install.sh (1)
229-250:⚠️ Potential issue | 🟡 Minor
/dev/ttyexistence check may not guarantee read access.The condition
[ -e /dev/tty ]checks if the file exists, but in certain containerized or restricted environments,/dev/ttymay exist but not be readable. If the condition passes but thereadfails, the script will exit due toset -e.Consider a more robust check that actually tests readability:
-elif [ -t 0 ] || [ -e /dev/tty ]; then +elif [ -t 0 ] || { [ -c /dev/tty ] && : < /dev/tty; } 2>/dev/null; thenAlternatively, wrap the read with error handling to fall back to defaults gracefully.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@install.sh` around lines 229 - 250, The interactive branch currently uses `[ -e /dev/tty ]` then `read -r CHOICE < /dev/tty`, which can fail if /dev/tty exists but is not readable; update the condition to test readability (e.g., `-r /dev/tty`) or otherwise guard the read by detecting readability before attempting `read -r CHOICE < /dev/tty` and implement a safe fallback (default CHOICE or non-interactive prompt) if the read fails so the script won’t abort under `set -e`; modify the conditional and the `read` handling around CHOICE to perform this check and fallback.task/opsx/src/main/kotlin/zone/clanker/gradle/tasks/execution/InstallGlobalTask.kt (1)
120-140:⚠️ Potential issue | 🟡 MinorFix dependency mismatch:
qualityincluded in Kotlin generator but missing frominstall.sh.
generateSrcxInitScriptincludesclasspath("zone.clanker:quality:$version")(line 133), but the equivalentwrite_srcx()function ininstall.shdoes not include this dependency. This creates an inconsistency where different installation methods produce different dependency environments.Either add
qualitytoinstall.sh'swrite_srcx()function or remove it fromgenerateSrcxInitScriptto ensure both installation paths are equivalent.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@task/opsx/src/main/kotlin/zone/clanker/gradle/tasks/execution/InstallGlobalTask.kt` around lines 120 - 140, The generateSrcxInitScript function adds classpath("zone.clanker:quality:$version") but install.sh's write_srcx() omits it, causing inconsistent dependency sets; update install.sh's write_srcx() to include the same quality dependency string (zone.clanker:quality:$version) in its generated initscript dependencies so both installation paths match the dependencies produced by generateSrcxInitScript.
🧹 Nitpick comments (2)
plugin/copilot/src/main/kotlin/zone/clanker/copilot/CopilotPlugin.kt (1)
142-145: Minor inconsistency:commandLine = cmdvscommandLine(cmd).This task uses property assignment (
commandLine = cmd) whileClaudeRunTask(line 106 in ClaudePlugin.kt) uses the function call style (commandLine(cmd)). Both work correctly, but consistency across agent plugins would improve maintainability.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugin/copilot/src/main/kotlin/zone/clanker/copilot/CopilotPlugin.kt` around lines 142 - 145, The code in CopilotPlugin.kt uses property assignment "commandLine = cmd" which is inconsistent with ClaudeRunTask's "commandLine(cmd)"; update the Copilot plugin to call the commandLine(...) function instead of assigning the property: locate where extraArgs.getOrElse(emptyList()).forEach { cmd += it } builds the cmd and then replace the property assignment with a call to commandLine(cmd) before invoking super.exec(), ensuring the same call-style API used in ClaudeRunTask is followed.README.md (1)
90-91: Inconsistent URL format reduces copy-paste usability.Line 91 uses a truncated placeholder
.../install.shwhile line 88 uses the full URL. For consistency and copy-paste friendliness, consider using the full URL here as well.# Piped — no terminal (CI) defaults to claude + copilot -curl -fsSL .../install.sh | bash +curl -fsSL https://raw.githubusercontent.com/ClankerGuru/openspec-gradle/main/install.sh | bash🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@README.md` around lines 90 - 91, The README's curl command uses a truncated placeholder (".../install.sh") which breaks copy-paste usability; update the command string on the line containing "curl -fsSL .../install.sh | bash" to use the full install URL matching the other occurrence (the full URL used earlier in the file) so both curl invocations are identical and immediately copy-pastable.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@install.sh`:
- Around line 229-250: The interactive branch currently uses `[ -e /dev/tty ]`
then `read -r CHOICE < /dev/tty`, which can fail if /dev/tty exists but is not
readable; update the condition to test readability (e.g., `-r /dev/tty`) or
otherwise guard the read by detecting readability before attempting `read -r
CHOICE < /dev/tty` and implement a safe fallback (default CHOICE or
non-interactive prompt) if the read fails so the script won’t abort under `set
-e`; modify the conditional and the `read` handling around CHOICE to perform
this check and fallback.
In
`@task/opsx/src/main/kotlin/zone/clanker/gradle/tasks/execution/InstallGlobalTask.kt`:
- Around line 120-140: The generateSrcxInitScript function adds
classpath("zone.clanker:quality:$version") but install.sh's write_srcx() omits
it, causing inconsistent dependency sets; update install.sh's write_srcx() to
include the same quality dependency string (zone.clanker:quality:$version) in
its generated initscript dependencies so both installation paths match the
dependencies produced by generateSrcxInitScript.
---
Nitpick comments:
In `@plugin/copilot/src/main/kotlin/zone/clanker/copilot/CopilotPlugin.kt`:
- Around line 142-145: The code in CopilotPlugin.kt uses property assignment
"commandLine = cmd" which is inconsistent with ClaudeRunTask's
"commandLine(cmd)"; update the Copilot plugin to call the commandLine(...)
function instead of assigning the property: locate where
extraArgs.getOrElse(emptyList()).forEach { cmd += it } builds the cmd and then
replace the property assignment with a call to commandLine(cmd) before invoking
super.exec(), ensuring the same call-style API used in ClaudeRunTask is
followed.
In `@README.md`:
- Around line 90-91: The README's curl command uses a truncated placeholder
(".../install.sh") which breaks copy-paste usability; update the command string
on the line containing "curl -fsSL .../install.sh | bash" to use the full
install URL matching the other occurrence (the full URL used earlier in the
file) so both curl invocations are identical and immediately copy-pastable.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7f5734e4-0f55-4363-84fb-2176fb5ba4ae
📒 Files selected for processing (7)
README.mdinstall.shplugin/claude/src/main/kotlin/zone/clanker/claude/ClaudePlugin.ktplugin/codex/src/main/kotlin/zone/clanker/codex/CodexPlugin.ktplugin/copilot/src/main/kotlin/zone/clanker/copilot/CopilotPlugin.ktplugin/opencode/src/main/kotlin/zone/clanker/opencode/OpencodePlugin.kttask/opsx/src/main/kotlin/zone/clanker/gradle/tasks/execution/InstallGlobalTask.kt
🚧 Files skipped from review as they are similar to previous changes (3)
- plugin/opencode/src/main/kotlin/zone/clanker/opencode/OpencodePlugin.kt
- plugin/claude/src/main/kotlin/zone/clanker/claude/ClaudePlugin.kt
- plugin/codex/src/main/kotlin/zone/clanker/codex/CodexPlugin.kt
…port
Adds java-gradle-plugin to all plugin modules so Gradle generates
marker artifacts (zone.clanker.wrkx.gradle.plugin, etc.) enabling
plugins { id("zone.clanker.wrkx") } in settings.gradle.kts.
Removes hand-written META-INF/gradle-plugins properties files
(now auto-generated). Disables strict validatePlugins since task
classes extend Exec which handles caching internally.
Summary
extraArgspassthrough to all run/exec tasks for future-proofing*-versiontasksextraArgsChanges
Codex — 6 new flags
--skip-git-repo-check,--ephemeral,--output-schema,--color,--json,--output-last-messageOpenCode — 10 new flags
--command,--share,--format,--file,--title,--attach,--password,--dir,--variant,--thinkingClaude — 5 new flags
--allow-dangerously-skip-permissions,--chrome,--no-chrome,--ide,--replay-user-messagesAll 4 agents
extraArgslist property on run/exec tasks — forward arbitrary CLI flags without needing a Gradle property:-PextraArgs=--new-flag,--other=valSkill templates
All 4 agent skill templates updated with "Passthrough" section documenting
extraArgs.Test plan
./gradlew build— 92 tasks)./gradlew copilot-versionshows wrapper version info./gradlew claude-run -Pprompt="test" -PextraArgs="--verbose"passes through the flagSummary by CodeRabbit
Documentation
-PextraArgsGradle property (Claude, Codex, Copilot, Opencode).New Features
/dev/tty) and defaults include Copilot in non-interactive installs.