Skip to content

Spec/skills and workflows#1120

Draft
Gkrumbach07 wants to merge 6 commits intomainfrom
spec/skills-and-workflows
Draft

Spec/skills and workflows#1120
Gkrumbach07 wants to merge 6 commits intomainfrom
spec/skills-and-workflows

Conversation

@Gkrumbach07
Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 31, 2026

Important

Review skipped

Draft detected.

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: CHILL

Plan: Pro

Run ID: 04024ead-f71a-4c80-b35a-03a4a3b2ce76

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
📝 Walkthrough

Walkthrough

A new specification document was added that defines the architecture for skills and workflows in Claude Code/ACP, including discovery mechanisms, installation models, session layering, marketplace integration, authentication, and local usage patterns via a load-workflow skill.

Changes

Cohort / File(s) Summary
Skills and Workflows Specification
specs/skills-and-workflows.md
Added comprehensive specification document detailing skills and workflows architecture, discovery mechanisms via .claude/ directories and marketplace catalogs, installation as source references to /workspace/sources/, session load layering, versioning via branch/tag/sha, UI visualization expectations, workspace credentials authentication, and local non-ACP usage via manual cloning and load-workflow skill.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess whether it relates to the changeset. Add a pull request description explaining the purpose and scope of the skills and workflows specification being introduced.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Spec/skills and workflows' clearly relates to the changeset, which adds a new specification document defining skills and workflows architecture.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 spec/skills-and-workflows
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch spec/skills-and-workflows

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@specs/skills-and-workflows.md`:
- Around line 235-236: The spec and frontend disagree on the workflow metadata
route (spec uses "/content/workflow-metadata" while frontend calls
"/projects/{project}/agentic-sessions/{session}/workflow/metadata"); pick one
canonical route (e.g., the project-scoped
"/projects/{project}/agentic-sessions/{session}/workflow/metadata") and update
the spec and server implementation to match, then add backward-compatible
handling in the server (accept the legacy "/content/workflow-metadata" and
respond with a 301/307 redirect or return the same payload under the new route)
and update any relevant references (e.g., the frontend service that calls
workflow/metadata and DATA_MODEL_COMPARISON documentation) to ensure a single
source of truth and prevent drift.
- Around line 166-173: Update the spec for /workspace/sources/{name} to define a
deterministic, safe naming scheme: specify a canonical source ID generated from
host+owner+repo+ref+path (e.g., host|owner|repo|branch|subpath) with a stable
hash suffix for uniqueness, normalize to lowercase, strip/replace unsafe
characters (disallow path separators like '/' or '..'), enforce a max length,
and on collision append a short unique hash; state that this canonical ID is
used as the directory name under /workspace/sources/{name} and when constructing
add_dirs for the Claude Agent SDK so imports are deterministic and safe.
- Around line 148-151: The spec requires storing workspace-level installed
sources in the ProjectSettings CR but the CRD lacks a matching field; update the
ProjectSettings CRD (components/manifests/base/crds/projectsettings-crd.yaml) to
include a top-level `sources` (or `installedSources`) schema (array of objects
with fields like id/name/version/registry/installedAt and appropriate types),
mark it optional for backward compatibility, and add a migration note in the
spec describing how to handle existing ProjectSettings (tolerate absent field,
populate from runtime registry on upgrade, and provide a one-time migration to
backfill values). Also update any references in the spec text to reference the
exact schema shape and backward-compat expectations so the feature is
implementable.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 077df6b6-e5e2-4f58-8cd0-04a80496c833

📥 Commits

Reviewing files that changed from the base of the PR and between 65e454c and 89ad82f.

📒 Files selected for processing (1)
  • specs/skills-and-workflows.md

Comment on lines +148 to +151
Source references installed at the workspace level are stored in the ProjectSettings CR. These represent the workspace's **registry** — what's available to sessions.

The registry is NOT auto-injected into every session. At session creation, users select which sources to load from the registry. The workflow they choose also pulls in its own dependencies from the `sources` array in `ambient.json`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

ProjectSettings storage is specified without a matching CRD contract.

This section makes workspace-level source registry a required persisted field, but the current ProjectSettings CRD schema (see components/manifests/base/crds/projectsettings-crd.yaml:1-95) does not define any sources/installed-source field. Please add the required schema shape and migration/backward-compat expectations in this spec, or this is not implementable as written.

As per coding guidelines, "Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@specs/skills-and-workflows.md` around lines 148 - 151, The spec requires
storing workspace-level installed sources in the ProjectSettings CR but the CRD
lacks a matching field; update the ProjectSettings CRD
(components/manifests/base/crds/projectsettings-crd.yaml) to include a top-level
`sources` (or `installedSources`) schema (array of objects with fields like
id/name/version/registry/installedAt and appropriate types), mark it optional
for backward compatibility, and add a migration note in the spec describing how
to handle existing ProjectSettings (tolerate absent field, populate from runtime
registry on upgrade, and provide a one-time migration to backfill values). Also
update any references in the spec text to reference the exact schema shape and
backward-compat expectations so the feature is implementable.

Comment on lines +166 to +173
Each source gets its own directory at `/workspace/sources/{name}/`, added to the Claude Agent SDK as a separate `--add-dir`. Claude Code discovers `.claude/skills/`, `.claude/commands/`, `.claude/agents/` inside each add_dir automatically via its standard discovery mechanism.

This mirrors how repos work (`/workspace/repos/{name}/`). Benefits:

- **Clean separation** — each source is isolated, easy to see what came from where
- **No conflicts** — two sources with a skill named `review` coexist in separate add_dirs
- **Simple removal** — removing a source is `rm -rf /workspace/sources/{name}/`
- **Standard mechanism** — `add_dirs` is exactly what Claude Code designed for external skill loading
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

/workspace/sources/{name} needs a deterministic and safe naming spec.

Using {name} as the clone directory key is underspecified for custom imports and can cause collisions (different repos/branches resolving to same name) or unsafe path handling if not normalized. Please specify canonical source ID generation (e.g., host+repo+path hash) and path-sanitization rules.

As per coding guidelines, "Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."

🧰 Tools
🪛 LanguageTool

[style] ~173-~173: Consider an alternative for the overused word “exactly”.
Context: ... Standard mechanismadd_dirs is exactly what Claude Code designed for external ...

(EXACTLY_PRECISELY)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@specs/skills-and-workflows.md` around lines 166 - 173, Update the spec for
/workspace/sources/{name} to define a deterministic, safe naming scheme: specify
a canonical source ID generated from host+owner+repo+ref+path (e.g.,
host|owner|repo|branch|subpath) with a stable hash suffix for uniqueness,
normalize to lowercase, strip/replace unsafe characters (disallow path
separators like '/' or '..'), enforce a max length, and on collision append a
short unique hash; state that this canonical ID is used as the directory name
under /workspace/sources/{name} and when constructing add_dirs for the Claude
Agent SDK so imports are deterministic and safe.

Comment on lines +235 to +236
The runner's `/content/workflow-metadata` endpoint returns all discovered skills, commands, and agents across all loaded sources and built-in Claude Code skills. The frontend uses this to populate the Skills toolbar button and `/` autocomplete in the chat input.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Workflow metadata endpoint conflicts with existing API contract.

The spec names /content/workflow-metadata, but frontend code currently calls /projects/{project}/agentic-sessions/{session}/workflow/metadata (components/frontend/src/services/api/workflows.ts:1-61), and components/ambient-api-server/DATA_MODEL_COMPARISON.md:1-50 marks workflow metadata as missing. Please define one canonical route (and compatibility/transition behavior) to prevent frontend/backend drift.

As per coding guidelines, "Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@specs/skills-and-workflows.md` around lines 235 - 236, The spec and frontend
disagree on the workflow metadata route (spec uses "/content/workflow-metadata"
while frontend calls
"/projects/{project}/agentic-sessions/{session}/workflow/metadata"); pick one
canonical route (e.g., the project-scoped
"/projects/{project}/agentic-sessions/{session}/workflow/metadata") and update
the spec and server implementation to match, then add backward-compatible
handling in the server (accept the legacy "/content/workflow-metadata" and
respond with a 301/307 redirect or return the same payload under the new route)
and update any relevant references (e.g., the frontend service that calls
workflow/metadata and DATA_MODEL_COMPARISON documentation) to ensure a single
source of truth and prevent drift.

@Gkrumbach07 Gkrumbach07 force-pushed the spec/skills-and-workflows branch from 0dbdde8 to 9b1d8b4 Compare April 2, 2026 21:14
Ambient Code Bot and others added 6 commits April 2, 2026 16:19
Define the architecture for how skills, workflows, and agents work in ACP:

- Workflow = prompt + list of skill source references (not embedded copies)
- Skills are the atomic reusable unit, discovered by Claude Code from add_dirs
- Manifest format (workflow.yaml) is the core contract — consumed by ACP
  runner, local load-workflow skill, or Claude Code plugin
- Three pillars: discovery (marketplace), installation (workspace library
  with per-session selection), usage (layered loading into add_dirs)
- Local portability: same manifest works with manual --add-dir, a meta-skill,
  or a Claude Code SessionStart hook plugin
…ient.json

Resolved all reviewer comments:
- Drop systemPrompt/startupPrompt from ambient.json, prompt lives in CLAUDE.md only
- Remove workflow.yaml concept, sources go in ambient.json
- Remove manifest-as-contract/multiple-consumers framing
- Sources support both structured {url, branch, path} and single URL string
- Scanner expects three source types: Claude Code plugins, marketplace
  catalogs, and standalone .claude repos
- Keep rubric as-is (optional, existing workflows use it)
- Auth for private sources uses existing workspace credential system
- Multi-agent orchestration noted as out of scope
- Local usage simplified to manual --add-dir or /load-workflow skill
Major changes:
- Everything is a source reference, no type distinction
- Marketplace behind feature flag
- Workflow builder removed (not MVP), replaced with visualization
- Skills go where Claude expects (not file-uploads), exact path TBD
- Versioning: branch (auto-update) + optional sha/tag (pinning)
- Selection: registry = available, session picks, 'always add' TBD
- Removed from scope: plugin export, RHAI alignment, security/supply chain
- All examples in JSON (not YAML), ambient.json only
- Local usage simplified to manual --add-dir or /load-workflow skill
Each source gets /workspace/sources/{name}/ as its own add_dir.
Claude Code discovers .claude/skills/ inside each automatically.
Clean separation, no conflicts, simple removal, standard mechanism.
Mirrors how repos work (/workspace/repos/{name}/).

Removed skill storage path from open questions (resolved).
Plugins (plugin.json, marketplace.json) are read by the marketplace for
browsing and display. At runtime, everything is a source reference —
cloned to /workspace/sources/{name}/ and added to add_dirs. No plugin
hooks, MCP, or LSP at session runtime.
Defines the architecture for how skills, workflows, and agents work in
ACP.

**Core insight**: A workflow is just a prompt + a list of skill source
references. Skills are the atomic reusable unit. The manifest format is
the contract — ACP and local tooling are just consumers.

- **Workflows don't contain skills** — they reference them by Git URL +
path
- **Skills are always fetched from canonical sources** at load time, not
embedded copies
- **Workspace library != auto-inject** — installing to workspace makes
items available, not active. Users select what loads per session.
- **Same manifest works everywhere** — ACP runner, local `--add-dir`, a
`/load-workflow` meta-skill, or a Claude Code plugin
- **Layered loading** — workflow dependencies + user-selected extras +
live imports, all fed into `add_dirs`

1. **Core Concepts** — Skill, Workflow, Agent, Manifest Format
2. **Discovery** — Marketplace, scanning, catalog format
3. **Installation & Configuration** — Workspace level, session level,
workflow builder, selection model
4. **Usage in Sessions** — Loading order, runtime management, metadata
5. **Local Usage** — Manual, load-workflow skill, Claude Code plugin
6. **Manifest Format** — Proposed YAML schema
7. **Open Questions** — Format, versioning, plugin compat, RHAI
alignment, security

Looking for feedback on:
- The manifest format (extend ambient.json vs new workflow.yaml?)
- The selection model (workspace library vs auto-inject)
- The Agent concept (persona + workflows + skills)
- RHAI alignment (RHAIRFE-1370)

---------

Co-authored-by: Ambient Code Bot <bot@ambient-code.local>
@Gkrumbach07 Gkrumbach07 force-pushed the spec/skills-and-workflows branch from 9b1d8b4 to f00769c Compare April 2, 2026 21:19
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