Skip to content

refactor(agents): unify provider resolution and subagent guidance - #118

Merged
Waishnav merged 13 commits into
pr/dw-15-profile-api-workflow-pathsfrom
pr/dw-16-agent-subagent-overhaul
Jul 27, 2026
Merged

refactor(agents): unify provider resolution and subagent guidance#118
Waishnav merged 13 commits into
pr/dw-15-profile-api-workflow-pathsfrom
pr/dw-16-agent-subagent-overhaul

Conversation

@Waishnav

@Waishnav Waishnav commented Jul 27, 2026

Copy link
Copy Markdown
Owner

The experimental provider configuration mixed persisted policy with live availability, while direct subagents and workflow agents resolved provider, model, and effort through different paths. Subagents and Dynamic Workflows also shared one capability gate, and copied bundled skills could become stale after package upgrades.

Keep provider discovery runtime-only and share one execution-target resolver across direct and workflow agent calls. Separate the Subagents and Dynamic Workflows gates, advertise only enabled and currently usable capabilities from open_workspace, replace the legacy delegation guidance with a compact package-managed subagents skill, and load provider-specific overrides on demand.

Stack

Final merged layer inside #94 before the follow-up refinement chain #119#120#121.

Summary by CodeRabbit

  • New Features

    • Added the subagents skill for delegating tasks through DevSpace agent commands.
    • Added provider-specific guidance for model and effort overrides.
    • Added clearer agent catalogs showing available providers and supported capabilities.
  • Improvements

    • Dynamic workflows and subagents can now be enabled independently.
    • Agent and workflow provider selection now uses currently available providers.
    • Workspace results omit capabilities that are disabled.
  • Documentation

    • Updated configuration, workflow, skills, and troubleshooting guidance to reflect the new behavior.
    • Removed references to the legacy subagent-delegation skill.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

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

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: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e766787b-451c-4277-a3dd-f13f49b81f78

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 pr/dw-16-agent-subagent-overhaul

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.

@Waishnav
Waishnav force-pushed the pr/dw-15-profile-api-workflow-paths branch from 50c065c to 3f01013 Compare July 27, 2026 12:49
@Waishnav
Waishnav force-pushed the pr/dw-16-agent-subagent-overhaul branch from 7cfaebd to 691998e Compare July 27, 2026 13:05

@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: 2

🧹 Nitpick comments (1)
src/local-agent-resolution.test.ts (1)

59-87: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for the target_not_found branch.

All LocalAgentResolutionError kinds are exercised except target_not_found (an unknown target that matches neither a profile nor a known provider id) — the one branch unique to CLI-style resolution.

✅ Suggested additional case
+assert.throws(
+  () => resolveLocalAgentExecution({
+    target: "not-a-real-target",
+    prompt: "x",
+    profiles: [reviewer],
+    availableProviders: ["codex"],
+  }),
+  (error) => error instanceof LocalAgentResolutionError && error.kind === "target_not_found",
+);
+
🤖 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 `@src/local-agent-resolution.test.ts` around lines 59 - 87, The tests around
resolveLocalAgentExecution cover the other LocalAgentResolutionError kinds but
omit target_not_found. Add an assertion using an unknown target that matches
neither a configured profile nor an available provider ID, and verify it throws
LocalAgentResolutionError with kind "target_not_found".
🤖 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 `@docs/configuration.md`:
- Line 96: Update the documentation to describe effective persisted capability
settings rather than requiring environment variables: in docs/configuration.md
lines 96 and 108-109, docs/chatgpt-coding-workflow.md lines 90-91 and 122-125,
and docs/gotchas.md lines 204-205, state that workflow fallback uses the
resolved Subagents setting and bundled skills are included whenever their
capability is enabled.

In `@skills/subagents/SKILL.md`:
- Around line 10-12: Update the target-selection guidance near open_workspace so
calling it is not mandatory for CLI delegation. When its workspace catalog is
available, restrict choices to returned profiles/providers; otherwise permit an
explicitly named target and rely on runtime availability validation to reject
unusable providers.

---

Nitpick comments:
In `@src/local-agent-resolution.test.ts`:
- Around line 59-87: The tests around resolveLocalAgentExecution cover the other
LocalAgentResolutionError kinds but omit target_not_found. Add an assertion
using an unknown target that matches neither a configured profile nor an
available provider ID, and verify it throws LocalAgentResolutionError with kind
"target_not_found".
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d342b90d-5f0a-4c75-8c79-c1d7f29b0974

📥 Commits

Reviewing files that changed from the base of the PR and between 3f01013 and 691998e.

📒 Files selected for processing (41)
  • docs/chatgpt-coding-workflow.md
  • docs/configuration.md
  • docs/dynamic-workflow/devspace/plan.md
  • docs/dynamic-workflow/devspace/primitives-spec.md
  • docs/gotchas.md
  • package.json
  • skills/dynamic-workflows/SKILL.md
  • skills/subagent-delegation/SKILL.md
  • skills/subagents/SKILL.md
  • skills/subagents/references/claude.md
  • skills/subagents/references/codex.md
  • skills/subagents/references/copilot.md
  • skills/subagents/references/cursor.md
  • skills/subagents/references/opencode.md
  • skills/subagents/references/pi.md
  • src/cli.ts
  • src/config.test.ts
  • src/config.ts
  • src/local-agent-availability.ts
  • src/local-agent-capabilities.test.ts
  • src/local-agent-capabilities.ts
  • src/local-agent-catalog.test.ts
  • src/local-agent-catalog.ts
  • src/local-agent-profiles.ts
  • src/local-agent-resolution.test.ts
  • src/local-agent-resolution.ts
  • src/local-agent-targets.ts
  • src/open-workspace-capabilities.test.ts
  • src/server.ts
  • src/skills.test.ts
  • src/skills.ts
  • src/ui/card-types.ts
  • src/ui/workflow-dashboard.ts
  • src/user-config.ts
  • src/workflow-api.ts
  • src/workflow-cli.ts
  • src/workflow-contracts.ts
  • src/workflow-engine.test.ts
  • src/workflow-engine.ts
  • src/workflow-tools.ts
  • src/workflow-types.ts
💤 Files with no reviewable changes (3)
  • skills/subagent-delegation/SKILL.md
  • src/workflow-contracts.ts
  • src/workflow-types.ts

Comment thread docs/configuration.md Outdated
Comment thread skills/subagents/SKILL.md Outdated
@Waishnav
Waishnav merged commit b347a82 into pr/dw-15-profile-api-workflow-paths Jul 27, 2026
4 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