Skip to content

feat(init): onboard CLI agent tooling - #169

Closed
Waishnav wants to merge 4 commits into
codex/dw-cli-skills-v3from
codex/dw-onboarding-v3
Closed

feat(init): onboard CLI agent tooling#169
Waishnav wants to merge 4 commits into
codex/dw-cli-skills-v3from
codex/dw-onboarding-v3

Conversation

@Waishnav

@Waishnav Waishnav commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Users should be able to enable the two CLI capabilities without hand-installing guidance. Setup now asks separately about Subagents and Dynamic Workflows, persists both switches, and installs enabled skills into ~/.devspace/skills (or the configured DevSpace directory). DevSpace-managed copies can be updated while user-owned skill directories are preserved; the documentation describes the CLI-only contract and compact workspace response.

Summary by CodeRabbit

  • New Features

    • Added independent setup and configuration for CLI Subagents and Dynamic Workflows.
    • Enabled discovery and installation of bundled skills, while preserving user-managed skills.
    • Added workflow commands, improved setup prompts, and expanded status and diagnostic information.
    • Added provider availability checks and compact agent profile information.
  • Documentation

    • Updated guides to describe CLI-based workflow execution, skill management, configuration, and troubleshooting.
  • Tests

    • Added coverage for workflow settings, configuration resolution, and managed skill installation.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds independent Subagents and Dynamic Workflows configuration, managed CLI skill installation, expanded diagnostics, and CLI-only workflow execution guidance. Documentation updates describe provider discovery, profile filtering, capability-specific skills, and shell-based workflow invocation.

Changes

Configuration and managed skills

Layer / File(s) Summary
Feature flags and managed skill installation
src/user-config.ts, src/config.ts, src/config.test.ts, src/skill-installer.ts, src/skill-installer.test.ts, package.json
Workflow settings now support environment overrides, persisted values, and Subagents fallback. Enabled skills are copied, marked, updated, or preserved according to ownership. Tests cover resolution and installation behavior.

CLI integration

Layer / File(s) Summary
CLI setup and diagnostics
src/cli.ts, src/server.ts
Initialization prompts separately for Subagents and Dynamic Workflows, installs managed skills, and reports provider availability when either capability is enabled. Help output lists workflow commands.

CLI workflow contract

Layer / File(s) Summary
CLI-only workflow execution
docs/dynamic-workflow/devspace/plan.md, docs/dynamic-workflow/devspace/primitives-spec.md
The workflow design removes dedicated MCP execution, listing, and progress surfaces. CLI commands now provide execution, status, follow, cancel, and list operations.

Capability and profile documentation

Layer / File(s) Summary
Skills, profiles, and provider discovery
docs/agent-profile-schema.md, docs/chatgpt-coding-workflow.md, docs/configuration.md, docs/gotchas.md, docs/setup.md
Documentation describes separate capability gates, managed skill installation, profile discovery, compact catalogs, runtime provider filtering, and shell-based CLI execution.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant DevSpaceCLI
  participant Config
  participant SkillInstaller
  participant WorkflowCLI
  Operator->>DevSpaceCLI: enable Subagents or Dynamic Workflows
  DevSpaceCLI->>Config: resolve persisted and environment settings
  DevSpaceCLI->>SkillInstaller: install enabled managed skills
  Operator->>WorkflowCLI: run or list workflow
  WorkflowCLI-->>Operator: return CLI workflow output and status
Loading

Possibly related PRs

  • Waishnav/devspace#55: Adds the local-agent profile catalog and CLI surfaces extended by this change.
  • Waishnav/devspace#83: Introduces workflow CLI configuration and feature flags updated here.
  • Waishnav/devspace#118: Shares feature gating, provider resolution, skill management, and workflow configuration surfaces.

Poem

A rabbit hops where workflows run,
With CLI paths beneath the sun.
Skills are copied, marked, and neat,
Old user skills keep their seat.
Providers bloom when tools are found—
Shell-led workflows leap around!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 clearly summarizes the main change: adding initialization support for CLI agent tooling.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/dw-onboarding-v3

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 changed the title codex/dw onboarding v3 feat(init): onboard CLI agent tooling Aug 9, 2026
@greptile-apps

greptile-apps Bot commented Aug 9, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds independent onboarding controls for CLI Subagents and Dynamic Workflows and installs enabled bundled skills into the user configuration directory. It also persists the workflow flag and updates the related documentation and tests.

  • Adds interactive capability prompts and managed skill installation to devspace init.
  • Introduces persisted workflows configuration with backward-compatible fallback to subagents.
  • Updates documentation to describe the CLI-only execution surface.
  • Adds installer and configuration coverage.

Confidence Score: 4/5

The skill installer’s failed-copy recovery should be fixed before merging because a transient filesystem error can leave onboarding permanently unable to repair the managed skill.

The installer writes its ownership marker only after copying, yet treats any existing unmarked directory as user-owned, so a partial first copy becomes unrecoverable; managed updates also merge rather than synchronize directory contents.

Files Needing Attention: src/skill-installer.ts

Important Files Changed

Filename Overview
src/skill-installer.ts Adds managed skill copying, but interrupted copies cannot be repaired automatically and overlay updates retain removed files.
src/cli.ts Adds separate onboarding prompts, persists both capability choices, and installs enabled skills after writing configuration.
src/user-config.ts Adds a backward-compatible workflow flag resolver that honors environment overrides.
src/config.ts Uses the shared workflow flag resolver when constructing runtime configuration.
src/skill-installer.test.ts Covers install, update, and preservation behavior but not interrupted-copy recovery or stale-file cleanup.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[devspace init] --> B[Prompt for Subagents]
  B --> C[Prompt for Dynamic Workflows]
  C --> D[Write config and auth]
  D --> E[Install enabled managed skills]
  E --> F{Destination exists?}
  F -- No --> G[Copy bundled skill]
  F -- Yes, managed --> G
  F -- Yes, unmarked --> H[Preserve user directory]
  G --> I[Write managed marker]
  I --> J[Setup complete]
Loading

Reviews (1): Last reviewed commit: "docs: document CLI-only agent workflows" | Re-trigger Greptile

Comment thread src/skill-installer.ts
Comment on lines +59 to +60
await cp(source, destination, { recursive: true, force: true });
await writeFile(marker, "Managed by DevSpace.\n", { encoding: "utf8", mode: 0o600 });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Failed copies become unrecoverable

When the initial cp fails after creating or partially populating the destination, the marker is never written, so the next initialization treats the partial directory as user-owned and preserves it instead of repairing the skill. This leaves onboarding permanently unable to complete without manually deleting the directory.

Comment thread src/skill-installer.ts
return { name, status: "preserved", path: destination };
}

await cp(source, destination, { recursive: true, force: true });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Managed updates retain stale files

Recursive cp overlays an existing managed skill without removing files absent from the new bundle. When a bundled reference is removed or renamed in a later release, its obsolete installed copy remains readable and can provide outdated or conflicting instructions.

@Waishnav
Waishnav force-pushed the codex/dw-onboarding-v3 branch from ef3fba7 to d8b457f Compare August 9, 2026 11:53
@Waishnav
Waishnav force-pushed the codex/dw-onboarding-v3 branch from d8b457f to 76495f9 Compare August 9, 2026 11:55
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

@Waishnav, I will review all changes in pull request #169.

⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 57 minutes.

@Waishnav

Waishnav commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

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

🤖 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/chatgpt-coding-workflow.md`:
- Around line 128-132: Update the workflow documentation around the DevSpace CLI
guidance to distinguish tool usage by mode: instruct standard modes and MCP
hosts to invoke commands with bash, while instructing codex mode users to use
exec_command because bash is hidden there. Keep the existing CLI and
skill-availability explanation intact.

In `@docs/configuration.md`:
- Around line 108-137: Update the DEVSPACE_WIDGETS=full documentation near the
workflow widget description to remove references to attaching UI to workflow
execution tools and live workflow dashboards. Ensure the description matches the
current MCP tool surface, which does not expose separate workflow execution
tools, while preserving any still-supported widget behavior.

In `@docs/dynamic-workflow/devspace/primitives-spec.md`:
- Around line 241-242: Remove the `--script-path` entry from the file-source
table in the workflow primitives specification, since the documented `workflow
run` contract only supports `--file`, `--name`, and `--resume`; do not add an
implementation unless the CLI contract, help output, parser, tests, and tool
surfaces are updated consistently.

In `@docs/setup.md`:
- Around line 25-28: Update the setup-flow documentation near the CLI Subagents
and Dynamic Workflows prompts to qualify skill installation: state that enabled
skills are copied only when the destination is new or previously marked as
DevSpace-managed, while preserving user-owned skill directories with the same
name.
🪄 Autofix

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: 043b99a6-6f6d-4d01-b0ed-34ea76c7d158

📥 Commits

Reviewing files that changed from the base of the PR and between 956295f and f89c220.

📒 Files selected for processing (15)
  • docs/agent-profile-schema.md
  • docs/chatgpt-coding-workflow.md
  • docs/configuration.md
  • docs/dynamic-workflow/devspace/plan.md
  • docs/dynamic-workflow/devspace/primitives-spec.md
  • docs/gotchas.md
  • docs/setup.md
  • package.json
  • src/cli.ts
  • src/config.test.ts
  • src/config.ts
  • src/server.ts
  • src/skill-installer.test.ts
  • src/skill-installer.ts
  • src/user-config.ts

Comment on lines +128 to +132
Subagents and Dynamic Workflows execute through the DevSpace CLI. The bundled
skills installed by `devspace init` describe the commands and are available to
ChatGPT, Claude, and coding harnesses that can run shell commands. MCP does not
register separate agent or workflow execution tools; use its ordinary `bash`
tool when the host needs to invoke a CLI command.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Document the shell tool for codex mode.

The text requires the ordinary bash tool, but Lines 159-162 state that codex mode hides bash and exposes exec_command. Tell users to use bash in the standard modes and exec_command in codex mode.

As per coding guidelines: “Verify the actual user-consumption path, including ... real MCP hosts ... tool surfaces, widgets, and rendered artifacts.”

🤖 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 `@docs/chatgpt-coding-workflow.md` around lines 128 - 132, Update the workflow
documentation around the DevSpace CLI guidance to distinguish tool usage by
mode: instruct standard modes and MCP hosts to invoke commands with bash, while
instructing codex mode users to use exec_command because bash is hidden there.
Keep the existing CLI and skill-availability explanation intact.

Source: Coding guidelines

Comment thread docs/configuration.md
Comment on lines +108 to +137
- the bundled `subagents` skill when the Subagents capability is enabled
- the bundled `dynamic-workflows` skill when the Dynamic Workflows capability is enabled
- `DEVSPACE_AGENT_DIR/skills`, defaulting to `~/.codex/skills`
- additional paths from `DEVSPACE_SKILL_PATHS`

User and project skills with the same name take precedence over bundled skills.
DevSpace does not copy bundled skills into `~/.devspace/skills` during setup.
`devspace init` asks about Subagents and Dynamic Workflows separately and
installs enabled skills into `~/.devspace/skills` (or the configured
`DEVSPACE_CONFIG_DIR/skills`). A user-owned directory is preserved; only a
directory previously marked as DevSpace-managed is updated.

When Subagents are enabled, DevSpace discovers agent profiles
When Subagents or Dynamic Workflows are enabled, DevSpace discovers agent profiles
from:

- `~/.devspace/agents/*.md`
- project `.devspace/agents/*.md`

`open_workspace` returns a compact catalog containing profile names,
descriptions, providers, and optional models/effort levels so the host model can choose an
agent without reading provider-specific launch details. `devspace agents ls`
descriptions, and optional model/effort defaults so the host model can choose an
agent without reading provider-specific launch details. Provider entries contain
only their names. `devspace agents ls`
lists existing subagent sessions for the current workspace, scoped by the
workspace environment injected into shell commands. The `subagents`
skill teaches the model to discover targets with `devspace agents targets`,
then use the minimal `devspace agents run`, `devspace agents show`, and
`devspace agents ls` workflow.

Provider availability is detected at runtime. DevSpace does not persist probe
timestamps, availability snapshots, or an experimental provider enable-list in
`config.json`. Final provider policy and onboarding are deferred until the
Subagents and Dynamic Workflows features are finalized.
Provider availability is detected at runtime. Unavailable providers and profiles
that depend on them are omitted from `open_workspace` and `devspace agents
targets`. The enabled feature switches are persisted in `config.json`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Remove the stale workflow-widget contract.

The current documentation says that MCP does not expose separate workflow execution tools, but Line 86 still says that DEVSPACE_WIDGETS=full attaches UI to workflow tools and live workflow dashboards. Update that widget description so users do not expect tools that are no longer registered.

As per coding guidelines: “Verify the actual user-consumption path, including ... tool surfaces, widgets, and rendered artifacts.”

🤖 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 `@docs/configuration.md` around lines 108 - 137, Update the
DEVSPACE_WIDGETS=full documentation near the workflow widget description to
remove references to attaching UI to workflow execution tools and live workflow
dashboards. Ensure the description matches the current MCP tool surface, which
does not expose separate workflow execution tools, while preserving any
still-supported widget behavior.

Source: Coding guidelines

Comment on lines +241 to +242
| File (`--file` / `--script-path`) | Persist to `<stateDir>/workflows/runs/<runId>.js` |
| Named (`--name`) | (1) `<workspace>/.devspace/workflows/<name>.js` (2) `~/.devspace/workflows/<name>.js` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Remove or implement --script-path.

Section 4.1 defines workflow run with --file, --name, and --resume only. This table tells users that --script-path is valid. Remove --script-path here, or add the flag to the CLI contract, help output, parser, and tests.

As per coding guidelines, verify the actual user-consumption path, including tool surfaces.

🤖 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 `@docs/dynamic-workflow/devspace/primitives-spec.md` around lines 241 - 242,
Remove the `--script-path` entry from the file-source table in the workflow
primitives specification, since the documented `workflow run` contract only
supports `--file`, `--name`, and `--resume`; do not add an implementation unless
the CLI contract, help output, parser, tests, and tool surfaces are updated
consistently.

Source: Coding guidelines

Comment thread docs/setup.md
Comment on lines +25 to +28
The setup flow asks one question at a time, including separate prompts for CLI
Subagents and Dynamic Workflows. Enabled skills are copied to
`~/.devspace/skills` (or the configured `DEVSPACE_CONFIG_DIR/skills`) so coding
harnesses can use them through their shell tools.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Qualify the skill installation statement.

The setup flow preserves user-owned skill directories with the same name and updates only directories previously marked as DevSpace-managed. Replace “Enabled skills are copied” with wording that states this behavior explicitly.

🤖 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 `@docs/setup.md` around lines 25 - 28, Update the setup-flow documentation near
the CLI Subagents and Dynamic Workflows prompts to qualify skill installation:
state that enabled skills are copied only when the destination is new or
previously marked as DevSpace-managed, while preserving user-owned skill
directories with the same name.

@Waishnav Waishnav closed this Aug 9, 2026
@Waishnav

Waishnav commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

Closing in favor of #144. The Sol implementation is more complete architecturally: remote MCP is optional, provider selection is explicit, and managed skill installation uses replacement/rollback semantics rather than an overlay copy. Review also found lifecycle issues here around partial installs and stale files that the replacement avoids.

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