Skip to content

feat(agent-runtime): add CLI composition flows (Phase 4)#513

Merged
yacosta738 merged 1 commit into
feature/capability-architecturefrom
feature/capability-architecture-481-cli-composition
Apr 11, 2026
Merged

feat(agent-runtime): add CLI composition flows (Phase 4)#513
yacosta738 merged 1 commit into
feature/capability-architecturefrom
feature/capability-architecture-481-cli-composition

Conversation

@yacosta738
Copy link
Copy Markdown
Contributor

Related Issues

Part of #430 (epic), closes #481 (Phase 4: CLI composition flows)


Summary

Implements Phase 4 of the capability-based architecture: CLI composition flows that let operators build, run, and scaffold agents from TOML manifests.

What changed:

  • src/composer.rs — new module with handle_composer_command dispatcher and three handlers:
    • handle_build_command: loads and validates manifest via AgentComposer, checks capability availability against the registered registries, scaffolds output directory
    • handle_run_command: validates manifest + platform constraints (sandbox availability), stubs boot-time run with a clear "not yet implemented" error pointing to build
    • handle_new_command: generates a ready-to-use TOML manifest from three built-in templates (chat-bot, support-bot, code-assistant)
  • src/main.rsCommands::Agent extended with an optional AgentCompositionCommands subcommand (build, run, new); legacy interactive loop is fully preserved when no subcommand is given
  • src/lib.rs — added pub mod composer and renamed the re-export from composer to corvus_composer to avoid the name collision

What did NOT change:

  • No existing trait signatures modified
  • No existing CLI contracts broken — corvus agent without subcommands behaves identically to before
  • No corvus-composer crate internals changed

Tested Information

  • cargo clippy --all-targets -- -D warnings → clean
  • cargo fmt -- --check → clean
  • cargo test --lib3493 tests, 0 failures
  • 15 new unit tests in composer::tests covering:
    • All three template generators (content assertions)
    • handle_new_command validation: empty name, slash in name, unknown template, file creation
    • handle_build_command: happy path with temp manifest, missing manifest error
    • handle_run_command: "not yet implemented" error, missing manifest error
    • check_sandbox_availability: none always available, unknown sandbox rejected, Linux-only sandboxes unavailable on non-Linux

Documentation Impact

  • No docs update required because this PR adds new CLI subcommands with self-describing --help output; no external APIs or configuration schemas changed.

Breaking Changes

None. The corvus agent command is fully backward-compatible.


Checklist

  • I have checked that there isn't already a PR solving the same problem.
  • I have read the Contributing Guidelines.
  • I ensured my code follows the project's style guidelines.
  • I have added or updated tests that prove my fix is effective or that my feature works.
  • I have updated the documentation, or I explained above why no documentation update is needed.
  • I verified the documentation matches the current behavior.
  • I have documented any breaking changes in the Breaking Changes section.
  • I have linked the related issue (if any).

Implement corvus agent build/run/new subcommands backed by corvus-composer.

- Add composer.rs module with handle_composer_command dispatcher
- Wire AgentCompositionCommands enum into the Agent CLI subcommand
- handle_build_command: validates manifest, checks capabilities, scaffolds output dir
- handle_run_command: validates + checks platform constraints, stubs boot-time run
- handle_new_command: generates TOML manifest from chat-bot/support-bot/code-assistant templates
- Add 15 unit tests covering templates, new-command validation, build/run happy/error paths,
  and sandbox platform availability
- Legacy 'corvus agent' interactive loop preserved via optional subcommand

Part of issue #481 (Phase 4: CLI composition flows).
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 11, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • main
  • develop

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 533a0744-db3b-4ac4-974f-24dcb6086e0e

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/capability-architecture-481-cli-composition

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.

@github-actions
Copy link
Copy Markdown
Contributor

✅ Contributor Report

User: @yacosta738
Status: Passed (12/13 metrics passed)

Metric Description Value Threshold Status
PR Merge Rate PRs merged vs closed 89% >= 30%
Repo Quality Repos with ≥100 stars 0 >= 0
Positive Reactions Positive reactions received 10 >= 1
Negative Reactions Negative reactions received 0 <= 5
Account Age GitHub account age 3088 days >= 30 days
Activity Consistency Regular activity over time 108% >= 0%
Issue Engagement Issues with community engagement 0 >= 0
Code Reviews Code reviews given to others 545 >= 0
Merger Diversity Unique maintainers who merged PRs 2 >= 0
Repo History Merge Rate Merge rate in this repo 92% >= 0%
Repo History Min PRs Previous PRs in this repo 231 >= 0
Profile Completeness Profile richness (bio, followers) 90 >= 0
Suspicious Patterns Spam-like activity detection 1 N/A

Contributor Report evaluates based on public GitHub activity. Analysis period: 2025-04-11 to 2026-04-11

@yacosta738 yacosta738 merged commit ced2b06 into feature/capability-architecture Apr 11, 2026
7 checks passed
@yacosta738 yacosta738 deleted the feature/capability-architecture-481-cli-composition branch April 11, 2026 16:10
This was referenced Apr 11, 2026
@dallay-bot dallay-bot Bot mentioned this pull request May 3, 2026
@dallay-bot dallay-bot Bot mentioned this pull request May 6, 2026
This was referenced May 10, 2026
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