Skip to content

feat(agent): add agent plugin integration#9

Merged
lucifer1004 merged 2 commits into
mainfrom
dev
Jun 19, 2026
Merged

feat(agent): add agent plugin integration#9
lucifer1004 merged 2 commits into
mainfrom
dev

Conversation

@lucifer1004

@lucifer1004 lucifer1004 commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Add the veloq agent meta command for Codex and Claude doctor, install, update, and uninstall workflows through the external agent-plugin-installer crate.

Materialize the Codex plugin package mirror, add mirror synchronization tooling, and wire a CI drift check for the generated plugin copy.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added veloq agent command for managing agent runtime integrations with doctor, install, update, and uninstall operations for supported agent runtimes via native CLIs.
    • Expanded profile analysis documentation with comprehensive guides for NVIDIA performance investigation workflows and metric interpretation.
  • Chores

    • Reorganized agent plugin package structure with improved canonical source layout.
    • Bumped version to 0.4.1.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@lucifer1004, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 5 minutes and 3 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3e14457d-6e4d-42bf-a412-405fd4ec613c

📥 Commits

Reviewing files that changed from the base of the PR and between 7f192bd and bfc8d27.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • crates/veloq/tests/cli_smoke/root.rs
  • gov/releases.toml
  • gov/work/2026-06-19-harden-agent-cli-smoke-assertions.toml
📝 Walkthrough

Walkthrough

Adds veloq agent (doctor/install/update/uninstall) backed by the external agent-plugin-installer crate, canonicalizes plugin sources under plugins/veloq/, adds a layout validation script, formalizes behavior in RFC-0010, bumps the workspace to v0.4.1, and bundles new skill documentation sets for NCU, NSys, and PyTorch profile analysis.

Changes

Agent command integration, packaging, and governance

Layer / File(s) Summary
RFC-0010 clauses, work items, and schema updates
gov/rfc/RFC-0010/..., gov/work/2026-06-*, gov/schema/loop-round.schema.json, gov/releases.toml
Populates RFC-0010 with normative clauses for command surface, supported agents, JSON response, native-CLI orchestration, package source, and summary; adds three govctl work items; updates releases.toml to 0.4.1; drops max_rounds and adds work to the loop-round schema.
Workspace version bump and meta-verb wiring
Cargo.toml, crates/veloq/Cargo.toml, crates/veloq/src/meta/mod.rs
Bumps workspace version to 0.4.1, adds agent-plugin-installer = "0.2" as a shared workspace dependency, and wires the agent module into meta-verb recognition, CLI registration, and dispatch routing.
Agent error variants and CLI data shapes
crates/veloq/src/meta/error.rs, crates/veloq/src/meta/agent.rs (L1–160)
Extends MetaError with AgentCliMissing, AgentCliFailed, AgentPackageMissing, and AgentUnsupportedOption variants with diagnostic codes/hints; defines AgentPayload, AgentRow, AgentStatus, AgentAuxiliary, and the Clap CLI surface.
Subcommand handlers, preflight, checkout validation, and row assembly
crates/veloq/src/meta/agent.rs (L161–425)
Implements doctor/install/update/uninstall handlers with agent selection, runtime CLI preflight checks, per-runtime checkout/package validation, agent_plugin_installer orchestration calls, error mapping, and deterministic row/key construction.
Plugin package layout, check script, and release tooling
.agents/skills, .claude-plugin/*, .codex-plugin/plugin.json, plugins/veloq/..., scripts/check-agent-plugin-package.sh, scripts/bump-version.sh, .github/workflows/*, .gitignore
Materializes canonical plugin manifests under plugins/veloq/; converts root manifest files to compatibility symlinks; adds a Bash validation script that enforces the canonical layout and fails on stray symlinks; updates bump-version.sh to target canonical paths; wires CI and release staging from plugins/veloq/skills.
Agent smoke tests, test helpers, and documentation
crates/veloq/tests/cli_smoke.rs, crates/veloq/tests/cli_smoke/root.rs, AGENTS.md, README.md, CHANGELOG.md
Adds run_veloq_with_env_and_cwd helper and Unix smoke tests for all agent subcommands; updates AGENTS.md with agent|<id> row key and veloq agent dependency note; rewrites README agent plugin section; adds v0.4.1 changelog entries.

Profile-analysis skill documentation bundles

Layer / File(s) Summary
NCU profile-analysis skill guide and references
plugins/veloq/skills/ncu-profile-analysis/SKILL.md, plugins/veloq/skills/ncu-profile-analysis/references/*
Adds the NCU SKILL entry guide plus a full reference suite covering stepwise workflow, six analysis dimensions, diagnosis heuristics, metrics/sections interpretation, cross-architecture metric naming, report template, and limitations.
NSys profile-analysis skill guide and references
plugins/veloq/skills/nsys-profile-analysis/SKILL.md, plugins/veloq/skills/nsys-profile-analysis/references/*
Adds the NSys SKILL entry guide and references for capability gating, extended cookbook recipes, inspect JSON shapes, time-window/NVTX attribution semantics, and limitations/edge cases.
PyTorch profile-analysis skill guide
plugins/veloq/skills/pytorch-profile-analysis/SKILL.md
Adds the PyTorch/Kineto SKILL guide covering input constraints, row-id conventions, command workflow, supported event types, and experimental contract notes.

Sequence Diagram

sequenceDiagram
    participant User as User / Agent Runtime
    participant VeloQ as veloq CLI
    participant MetaAgent as meta::agent::run
    participant Installer as agent_plugin_installer
    participant NativeCLI as codex / claude (native)

    User->>VeloQ: veloq agent install codex --from-checkout <path>
    VeloQ->>MetaAgent: dispatch "agent"
    MetaAgent->>MetaAgent: validate_checkout → check plugins/veloq metadata
    MetaAgent->>Installer: preflight check_operation (codex --help)
    Installer->>NativeCLI: codex --help
    NativeCLI-->>Installer: exit 0
    Installer-->>MetaAgent: ok
    MetaAgent->>Installer: install(codex, checkout_path)
    Installer->>NativeCLI: codex plugin add veloq@<checkout_path>
    NativeCLI-->>Installer: exit 0
    Installer-->>MetaAgent: success
    MetaAgent-->>VeloQ: AgentRow { key="agent|codex", status="installed" }
    VeloQ-->>User: JSON envelope with data.rows
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐇 A rabbit hops into the terminal bright,
veloq agent install — what a sight!
Symlinks repointed, manifests aligned,
Skills docs for NCU, NSys combined.
Preflight checks pass, the JSON glows right —
This warren's in order, all packaged up tight! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(agent): add agent plugin integration' directly and concisely summarizes the main change—introducing agent plugin integration with the new veloq agent command.
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 dev

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.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

Add the `veloq agent` meta command for Codex and Claude doctor, install, update, and uninstall workflows through the external agent-plugin-installer crate.

Materialize the Codex plugin package mirror, add mirror synchronization tooling, and wire a CI drift check for the generated plugin copy.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
crates/veloq/tests/cli_smoke/root.rs (1)

185-190: ⚡ Quick win

Also assert stderr isolation for child process output in JSON mode tests

Both tests intentionally emit child stderr ("child stderr must stay captured"), but only stdout leakage is asserted. Add explicit stderr checks so regressions in stderr routing are caught.

As per coding guidelines, in JSON mode stderr should stay quiet to avoid agent-side dedupe noise. Based on learnings, stdout/stderr envelope behavior is contract-sensitive for CLI flows.

Suggested patch
     let stdout = String::from_utf8_lossy(&out.stdout);
+    let stderr = String::from_utf8_lossy(&out.stderr);
     assert!(
         !stdout.contains("child stdout must stay captured"),
         "child stdout leaked into VeloQ stdout: {stdout}"
     );
+    assert!(
+        !stderr.contains("child stderr must stay captured"),
+        "child stderr leaked into VeloQ stderr: {stderr}"
+    );
     let stdout = String::from_utf8_lossy(&out.stdout);
+    let stderr = String::from_utf8_lossy(&out.stderr);
     assert!(
         !stdout.contains("child stdout must stay captured"),
         "child stdout leaked into VeloQ stdout: {stdout}"
     );
+    assert!(
+        !stderr.contains("child stderr must stay captured"),
+        "child stderr leaked into VeloQ stderr: {stderr}"
+    );

Also applies to: 392-397

🤖 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 `@crates/veloq/tests/cli_smoke/root.rs` around lines 185 - 190, The test
currently only asserts that stdout does not contain the string "child stdout
must stay captured" but does not check stderr isolation. Add an assertion to
verify that stderr also does not contain "child stderr must stay captured" to
catch regressions in stderr routing behavior. Extract the stderr from the output
using String::from_utf8_lossy applied to out.stderr, then add an assert!
statement similar to the stdout check but referencing the stderr string. Apply
this same pattern to both test cases mentioned in the comment (the one around
lines 185-190 and the additional one around lines 392-397).

Sources: Coding guidelines, Learnings

🤖 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 `@crates/veloq/tests/cli_smoke/root.rs`:
- Around line 347-351: The assertion using log.lines().all() will pass vacuously
when the log is empty, allowing the test to succeed even if the preflight
command never actually ran or produced output. Add a guard condition to ensure
the log contains at least one line before checking the all() predicate. Modify
the assertion to check that log is not empty (using a length or character count
check) in conjunction with the existing all() predicate to ensure both that
output was produced and that all lines match the expected pattern.

---

Nitpick comments:
In `@crates/veloq/tests/cli_smoke/root.rs`:
- Around line 185-190: The test currently only asserts that stdout does not
contain the string "child stdout must stay captured" but does not check stderr
isolation. Add an assertion to verify that stderr also does not contain "child
stderr must stay captured" to catch regressions in stderr routing behavior.
Extract the stderr from the output using String::from_utf8_lossy applied to
out.stderr, then add an assert! statement similar to the stdout check but
referencing the stderr string. Apply this same pattern to both test cases
mentioned in the comment (the one around lines 185-190 and the additional one
around lines 392-397).
🪄 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: 12a6d532-a9dd-41d3-baa6-b2af21f6a40d

📥 Commits

Reviewing files that changed from the base of the PR and between f71be42 and 7f192bd.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (53)
  • .agents/skills
  • .claude-plugin/marketplace.json
  • .claude-plugin/plugin.json
  • .claude-plugin/plugin.json
  • .codex-plugin/plugin.json
  • .codex-plugin/plugin.json
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .gitignore
  • AGENTS.md
  • CHANGELOG.md
  • Cargo.toml
  • README.md
  • crates/veloq/Cargo.toml
  • crates/veloq/src/meta/agent.rs
  • crates/veloq/src/meta/error.rs
  • crates/veloq/src/meta/mod.rs
  • crates/veloq/tests/cli_smoke.rs
  • crates/veloq/tests/cli_smoke/root.rs
  • gov/releases.toml
  • gov/rfc/RFC-0010/clauses/C-COMMAND-SURFACE.toml
  • gov/rfc/RFC-0010/clauses/C-JSON-RESPONSE.toml
  • gov/rfc/RFC-0010/clauses/C-NATIVE-CLI-ORCHESTRATION.toml
  • gov/rfc/RFC-0010/clauses/C-PACKAGE-SOURCE.toml
  • gov/rfc/RFC-0010/clauses/C-SUMMARY.toml
  • gov/rfc/RFC-0010/clauses/C-SUPPORTED-AGENTS.toml
  • gov/rfc/RFC-0010/rfc.toml
  • gov/schema/loop-round.schema.json
  • gov/work/2026-06-14-add-veloq-agent-integration-installer.toml
  • gov/work/2026-06-19-fix-claude-agent-plugin-checkout-install.toml
  • gov/work/2026-06-19-make-veloq-agent-plugin-package-the-canonical-skill-source.toml
  • gov/work/2026-06-19-refresh-bundled-govctl-loop-round-schema.toml
  • plugins/veloq/.claude-plugin/plugin.json
  • plugins/veloq/.codex-plugin
  • plugins/veloq/.codex-plugin/plugin.json
  • plugins/veloq/skills
  • plugins/veloq/skills/ncu-profile-analysis/SKILL.md
  • plugins/veloq/skills/ncu-profile-analysis/references/analysis-dimensions.md
  • plugins/veloq/skills/ncu-profile-analysis/references/diagnosis-reference.md
  • plugins/veloq/skills/ncu-profile-analysis/references/limitations.md
  • plugins/veloq/skills/ncu-profile-analysis/references/metric-name-arch-notes.md
  • plugins/veloq/skills/ncu-profile-analysis/references/metrics-and-sections.md
  • plugins/veloq/skills/ncu-profile-analysis/references/report-template.md
  • plugins/veloq/skills/ncu-profile-analysis/references/workflow.md
  • plugins/veloq/skills/nsys-profile-analysis/SKILL.md
  • plugins/veloq/skills/nsys-profile-analysis/references/capabilities.md
  • plugins/veloq/skills/nsys-profile-analysis/references/cookbook.md
  • plugins/veloq/skills/nsys-profile-analysis/references/inspect-shapes.md
  • plugins/veloq/skills/nsys-profile-analysis/references/limitations.md
  • plugins/veloq/skills/nsys-profile-analysis/references/time-and-nvtx.md
  • plugins/veloq/skills/pytorch-profile-analysis/SKILL.md
  • scripts/bump-version.sh
  • scripts/check-agent-plugin-package.sh
💤 Files with no reviewable changes (2)
  • plugins/veloq/skills
  • plugins/veloq/.codex-plugin
✅ Files skipped from review due to trivial changes (12)
  • .codex-plugin/plugin.json
  • .agents/skills
  • plugins/veloq/.claude-plugin/plugin.json
  • gov/work/2026-06-19-make-veloq-agent-plugin-package-the-canonical-skill-source.toml
  • .claude-plugin/plugin.json
  • gov/rfc/RFC-0010/clauses/C-SUMMARY.toml
  • gov/releases.toml
  • gov/rfc/RFC-0010/rfc.toml
  • CHANGELOG.md
  • .gitignore
  • gov/rfc/RFC-0010/clauses/C-NATIVE-CLI-ORCHESTRATION.toml
  • AGENTS.md
🚧 Files skipped from review as they are similar to previous changes (11)
  • plugins/veloq/.codex-plugin/plugin.json
  • crates/veloq/Cargo.toml
  • crates/veloq/src/meta/agent.rs
  • gov/work/2026-06-14-add-veloq-agent-integration-installer.toml
  • gov/rfc/RFC-0010/clauses/C-COMMAND-SURFACE.toml
  • gov/rfc/RFC-0010/clauses/C-JSON-RESPONSE.toml
  • gov/rfc/RFC-0010/clauses/C-PACKAGE-SOURCE.toml
  • crates/veloq/src/meta/mod.rs
  • README.md
  • crates/veloq/src/meta/error.rs
  • gov/rfc/RFC-0010/clauses/C-SUPPORTED-AGENTS.toml

Comment thread crates/veloq/tests/cli_smoke/root.rs
@lucifer1004
lucifer1004 merged commit ffbd1a7 into main Jun 19, 2026
8 of 9 checks passed
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