Skip to content

[UD] Devfile Creator and Workspace Loader with AI Agent #23840

@olexii4

Description

@olexii4

Is your enhancement related to a problem? Please describe

Eclipse Che users who want to create or customize devfiles have no native tooling in the dashboard today. The workflow is manual: write YAML in an external editor, upload or paste it, and iterate through workspace start failures without contextual help. Two pain points stand out:

  1. Devfile authoring is hard without tooling. There is no YAML editor with schema validation, autocompletion, or contextual AI assistance inside the dashboard. Users regularly make mistakes — wrong schemaVersion, missing args on non-UDI containers, incorrect command references — that only surface as cryptic workspace failures.

  2. Diagnosing workspace startup failures requires deep Kubernetes knowledge. When a workspace fails to start, users see a generic error message. Finding the root cause (pod events, container logs, DevWorkspace conditions) requires kubectl access and familiarity with the DevWorkspace operator internals.

Describe the solution you'd like

1. Devfile Creator — /devfiles

A new section in the dashboard for managing user-owned devfiles:

  • Devfiles list page — create, delete, and navigate to devfiles stored in a per-user Kubernetes ConfigMap (devfile-creator-storage).
  • Devfile detail / editor page — CodeMirror 6 YAML editor with:
    • JSON Schema-driven validation and autocompletion (devfile schema v2.0.0 – v2.3.0)
    • Inline error display (line, column, message)
    • Create Workspace button that pre-fills the factory URL with the devfile's raw endpoint
  • AI Agent panel — embedded terminal (ttyd) running Claude Code with the devfile-creator skill. The agent has direct Kubernetes API access (user token) to read and write the devfile ConfigMap. It analyzes Git repositories, selects appropriate container images, generates components and commands, and streams updates to the editor in real time via a ConfigMap watch WebSocket channel.

2. Workspace Loader — DevWorkspace tab and AI Agent

Extensions to the existing workspace loader page for failing workspaces:

  • DevWorkspace editor tab — YAML editor for the live DevWorkspace resource with DevWorkspace CRD schema validation and autocompletion. Allows patching the spec directly without kubectl.
  • AI Agent panel — same agent container pre-loaded with the workspace-troubleshooting skill. The agent reads DevWorkspace status conditions, pod events, and container logs, identifies the root cause, proposes a targeted patch, and (with explicit user confirmation) applies it and restarts the workspace.

3. Backend additions

Endpoint Purpose
GET/POST/PUT/DELETE /dashboard/api/devfile-creator/namespace/:ns CRUD for devfiles in ConfigMap
GET /dashboard/api/devfile-creator/namespace/:ns/:id/raw Raw YAML for factory flow
GET/POST/DELETE /dashboard/api/agents/namespace/:ns Agent pod lifecycle
GET /dashboard/api/agents/namespace/:ns/:id/terminal-url Terminal URL discovery
WS /dashboard/api/agents/namespace/:ns/:id/terminal WebSocket reverse proxy (avoids CORS)
GET /dashboard/api/ai-agent-registry Agent definitions from cluster ConfigMap
GET /dashboard/api/devfile?version= Static devfile JSON schemas
GET /dashboard/api/devworkspace-schema DevWorkspace CRD JSON schema

WebSocket channels: CONFIGMAP_WATCH (real-time editor sync), AGENT_POD_STATUS (agent readiness).

4. AI Agent container

A separate minimal container image (olexii4/che-dashboard-agent) running Claude Code inside ttyd. Delivered as a Kubernetes Pod created by the dashboard backend on demand. Agent definitions are registered in the cluster via an ai-agent-registry ConfigMap.

Describe alternatives you've considered

  • External devfile editor (VS Code extension, web app) — requires leaving the dashboard and loses the context of the current workspace/namespace.
  • Static AI suggestions (LLM API called from the backend) — no access to the live cluster state; cannot diagnose real-time pod events or patch DevWorkspace specs.
  • kubectl-based troubleshooting docs — useful as reference but requires users to have cluster access and Kubernetes expertise.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions