This is an automated email from the ASF dual-hosted git repository. luigidemasi pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kit.git
commit b3cdd06dafd10a9a3d04f4f5f88c9db12d2d27ff Author: Luigi De Masi <[email protected]> AuthorDate: Fri Nov 27 11:09:53 2026 +0100 Fix #126: Clarify the verification handoff and skill entry points Co-authored-by: OpenAI Codex <[email protected]> --- CONTRIBUTING.md | 3 ++- docs/architecture.md | 4 ++-- docs/commands.md | 15 ++++++++++---- docs/modules/ROOT/pages/agents.adoc | 23 +++++++++++++++++----- docs/modules/ROOT/pages/contributing.adoc | 5 +++-- docs/modules/ROOT/pages/skills.adoc | 23 ++++------------------ docs/security-model.md | 2 +- docs/security-model.yaml | 2 +- docs/user-guide.md | 6 +++--- .../main/resources/skills/camel-execute/SKILL.md | 4 +++- .../main/resources/skills/camel-verify/SKILL.md | 3 ++- .../skills/camel-verify/guides/verify-loop.md | 2 +- .../resources/workflow/camel-kit-workflow.yaml | 3 ++- .../kit/generator/ShippedAssetStructureTest.java | 6 ++++++ 14 files changed, 59 insertions(+), 42 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 90d2c989..0d36ed5b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -378,7 +378,8 @@ Each guide in `guides/` is a self-contained markdown file loaded by the agent wh Register every core skill under `skills` in the [workflow manifest](kit/camel-kit-core/src/main/resources/workflow/camel-kit-workflow.yaml). The comments above that section explain how to choose its status. Match the source `user_invocable` value in `SKILL.md`. -- For a public skill, set `generated_command` to its `user_facing` command, document it in +- For a public skill, register its command with `user_facing: true` and `generated_stub: true`. Set + `generated_command` to that name, document it in [the command reference](docs/commands.md#slash-commands), and check its entry point on all eight targets. - For an internal skill, set `generated_command: null` and reference its instructions or guides from the caller. diff --git a/docs/architecture.md b/docs/architecture.md index 33b95788..83dd15bc 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -75,7 +75,7 @@ frontmatter must match the manifest. Only the router sets `user_invocable: true` | `camel-migrate` | `pipeline` | `camel-start` (migration) | Vendor-aware risk, retirement, and safe-seam analysis plus design; hands an approved design to `camel-plan`. In direct mode, implements route files under Iron Laws 1 and 2 with inline validation and user-authorized runtime check | | `camel-verify` | `internal` | `camel-execute` (internal role: subagent where supported, inline otherwise) | 3-phase runtime verification loop (build, Citrus tests, report) — runs inside execute, not as a standalone pipeline stage | | `camel-ship` | `standalone` | -- (standalone CLI delegate) | **Technology Preview.** Forwards to the configured local Ship command; the controller owns stages, run state, and oversight | -| `camel-design` | `internal` | `camel-brainstorm` | Guides for component selection, EIP catalog, and flow design assembly | +| `camel-design` | `internal` | `camel-brainstorm` and `camel-migrate` (phase 2) | Guides for component selection, EIP catalog, and flow design assembly | | `camel-implement` | `internal` | `camel-execute` | Guides for YAML generation, properties, Docker Compose, DataMapper | | `camel-validate` | `pipeline` | `camel-execute` or direct invocation | Tier 1 quality gate: schema validation, endpoint verification, security analysis | | `camel-test` | `internal` | `camel-execute` | Guides for route analysis and test generation with Citrus + Testcontainers | @@ -986,7 +986,7 @@ user_invocable: false 3. **Write guide files** in `guides/`. Each guide is a self-contained markdown instruction file loaded by the agent when the skill is active. -4. **Register every core skill** in the [workflow manifest](../kit/camel-kit-core/src/main/resources/workflow/camel-kit-workflow.yaml) using the criteria above `skills`. Set `generated_command` to the public command name or to `null` for an internal helper. Update stages, artifacts, transitions and MCP tool allowlists when they change. +4. **Register every core skill** in the [workflow manifest](../kit/camel-kit-core/src/main/resources/workflow/camel-kit-workflow.yaml) using the criteria above `skills`. For a public skill, add a `commands` entry with `user_facing: true` and `generated_stub: true`, and set the skill’s `generated_command` to that command’s name. For an internal helper, set `generated_command: null`. Update stages, artifacts, transitions and MCP tool allowlists when they change. 5. **If registering generated command or skill entry points:** update agent-specific guidance only where the command needs custom behavior beyond the generated stub or project skill. The default generator creates command stubs from the manifest. Agent templates still need updates when they contain human-readable command tables, custom modes, policies, or sub-agent dispatch: - Claude Code: update `templates/claude/claude-md.md` diff --git a/docs/commands.md b/docs/commands.md index fc45057b..70b5a3dd 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -614,7 +614,7 @@ camel-kit doc unstale docs/camel-kit/001-order-processing/implementation-plan.md ## Slash Commands Start with `/camel-start` to route a request, or invoke any of the nine public skills directly. -The examples below use slash commands. See the [entry points for each assistant](modules/ROOT/pages/skills.adoc#entry-points) +The examples below use slash commands. See the [entry points for each assistant](modules/ROOT/pages/agents.adoc#entry-points) for Bob Shell and Codex `$camel-*` mentions, Pi `/skill:camel-*` commands and other native forms. The [core workflow manifest](../kit/camel-kit-core/src/main/resources/workflow/camel-kit-workflow.yaml) defines the classification. Command generation and @@ -1114,9 +1114,13 @@ GitHub Copilot CLI now uses its native `.github/skills/` surface exclusively. Ol ### /camel-knowledge -Ask a documentation, component, release or security advisory question, for example -`/camel-knowledge Which options does the Kafka component support?` The skill uses the Knowledge MCP server -to return findings with sources. Brainstorm and Execute can also use it during a pipeline. +**Purpose:** Answer factual Apache Camel questions using the Knowledge MCP server. + +**When to use:** Look up a component, release, migration guide, issue or security advisory. Brainstorm and Execute also use this skill during a pipeline. + +**Produces:** An answer with sources for the findings. + +**Example:** `/camel-knowledge Which options does the Kafka component support?` --- @@ -1235,6 +1239,9 @@ camel-kit init my-project --ai claude # Validate (standalone, any project) /camel-validate # Validate routes in current project +# Documentation lookup +/camel-knowledge What changed in my Camel release? + # Debug (ad-hoc troubleshooting) /camel-debug # Diagnose and fix a broken route ``` diff --git a/docs/modules/ROOT/pages/agents.adoc b/docs/modules/ROOT/pages/agents.adoc index ba1409d7..3132cfd5 100644 --- a/docs/modules/ROOT/pages/agents.adoc +++ b/docs/modules/ROOT/pages/agents.adoc @@ -4,18 +4,30 @@ Markdown skills; `init` adapts them with agent-specific traits and writes the agent's native configuration, so the workflow is the same everywhere and only the way you invoke it differs. -[cols="1,1,2"] +[[entry-points]] +== Public skill entry points + +[cols="2,1,2,3"] |=== -| Agent | Init flag | Start the workflow +| Agent | Init flag | Start the workflow | How the public skill is installed | Anthropic Claude Code | `--ai claude` | `/camel-start` +| Native skill in `.claude/skills/` in the development snapshot. See <<claude-native-skills,Claude skill discovery and upgrades>>. | IBM Bob 2 (default) | `--ai bob2` | `$camel-start` in Bob Shell, `/camel-start` in Bob IDE -| Google Antigravity | `--ai antigravity` | `/camel-start`, or ask for the `camel-start` skill by name +| Native skill in `.bob/skills/`. Bob Shell lists it in `/skills`. Kit also writes legacy command stubs. +| Google Antigravity | `--ai antigravity` | `/camel-start` or ask for `camel-start` by name +| Native skill in `.agents/skills/`. | OpenAI Codex CLI | `--ai codex` | `$camel-start` after trusting the repository -| GitHub Copilot CLI | `--ai copilot` | Ask Copilot to "Use the `/camel-start` skill" +| Native skill in `.agents/skills/`. Open `/skills` to browse. +| GitHub Copilot CLI | `--ai copilot` | Ask Copilot to use the `camel-start` skill +| Native skill in `.github/skills/`. | Pi | `--ai pi` | `/skill:camel-start` after `/trust` +| Native skill in `.pi/skills/`. Kit also writes prompt shortcuts for every public skill except Ship. +Use `/skill:camel-ship` to preserve quoted arguments. | Qwen Code | `--ai qwen` | `/camel-start` +| Command stub in `.qwen/commands/`. Qwen loads `/camel-ship` from its native skill so it can dispatch Ship work. | OpenCode | `--ai opencode` | `/camel-start` +| Command stub in `.opencode/commands/` loads the matching skill. |=== The generated assets and the MCP configuration file of each target are listed in @@ -137,7 +149,8 @@ codex (planner, implementer, tester, validator, migrator, catalog researcher and security reviewer; the development snapshot adds a Ship worker) and the MCP servers in `.codex/config.toml` (two by default; three with `--with-citrus-mcp`). It does not create `.codex/commands/`: Codex discovers the skills directly, so you start with `$camel-start` after trusting the repository, and inspect skills with `/skills` and -servers with `/mcp`. +servers with `/mcp`. In installed skill Markdown, Kit rewrites explicit skill mentions such as +`/camel-debug` to `$camel-debug`. File paths and Markdown link destinations keep their original spelling. Codex loads the repository `.codex/` configuration only for trusted projects. Review the repository before trusting it; until then the custom agents and the MCP servers are not active. The setup stays repository-scoped: Camel Kit diff --git a/docs/modules/ROOT/pages/contributing.adoc b/docs/modules/ROOT/pages/contributing.adoc index c915d10b..fd1b52c2 100644 --- a/docs/modules/ROOT/pages/contributing.adoc +++ b/docs/modules/ROOT/pages/contributing.adoc @@ -84,8 +84,9 @@ A skill is a directory under `kit/camel-kit-core/src/main/resources/skills/` wit matter with `name`, `description` and `user_invocable`, then the steps and a guide table) and a `guides/` directory of instruction files loaded on demand. Register every core skill in the https://github.com/apache/camel-kit/blob/main/kit/camel-kit-core/src/main/resources/workflow/camel-kit-workflow.yaml[core workflow manifest]. -Use the criteria above `skills` to choose its status. For a public entry, name its `user_facing` command in -`generated_command`, add it to the command reference and check xref:skills.adoc#entry-points[each assistant's entry point]. +Use the criteria above `skills` to choose its status. For a public skill, add a `commands` entry with `user_facing: true` and `generated_stub: true`. +Set the skill's `generated_command` to that name, document it in the command reference and check +xref:agents.adoc#entry-points[each assistant's entry point]. For an internal helper, set `generated_command: null` and reference its instructions or guides from the calling skill. Pack contributions use the <<skill-packs,pack descriptor>>. Shared guides under `skills/shared/` feed several skills, so check every caller before editing one. Agent-specific diff --git a/docs/modules/ROOT/pages/skills.adoc b/docs/modules/ROOT/pages/skills.adoc index f23784a3..e37f94ae 100644 --- a/docs/modules/ROOT/pages/skills.adoc +++ b/docs/modules/ROOT/pages/skills.adoc @@ -29,6 +29,7 @@ xref:getting-started.adoc#existing-project[how to compare or accept a proposed f |=== Four internal helpers supply the pipeline's instructions. Brainstorm uses `camel-design` for design choices. +Migrate also reads its performance, security and monitoring guides when phase 2 requirements call for them. Execute uses `camel-implement` for routes and configuration, `camel-test` for Citrus tests, and `camel-verify` to build and test the resulting application and record the outcome in the execution report. Use `camel-debug` to investigate a failure outside Execute and `camel-validate` for a static quality check. @@ -36,25 +37,9 @@ Use `camel-debug` to investigate a failure outside Execute and `camel-validate` [[entry-points]] == Invoking a public skill -The nine public skills have an entry point on each supported assistant. For example, to debug a broken route: - -[cols="1,2,3"] -|=== -| Assistant | Example | How the entry is installed - -| Claude Code | `/camel-debug` | Native skill under `.claude/skills/` in the development snapshot. -See xref:agents.adoc#claude-native-skills[Claude skill discovery and upgrades]. -| IBM Bob 2 | `$camel-debug` in Bob Shell, `/camel-debug` in Bob IDE | Native picker entries under `.bob/skills/`. -Kit also writes legacy command stubs. Bob Shell lists public skills in `/skills`. -| Antigravity | `/camel-debug` or ask for `camel-debug` by name | Native skill under `.agents/skills/`. -| Codex CLI | `$camel-debug` | Native skill under `.agents/skills/`. Open `/skills` to browse. -| GitHub Copilot CLI | Ask Copilot to use the `camel-debug` skill | Native skill under `.github/skills/`. -| OpenCode | `/camel-debug` | Command stub under `.opencode/commands/` loads the matching skill. -| Qwen Code | `/camel-debug` | Command stub under `.qwen/commands/`. Qwen loads `/camel-ship` directly -from its native skill so it can dispatch Ship work. -| Pi | `/skill:camel-debug` | Native skill under `.pi/skills/` in a trusted project. Kit also generates -`/camel-debug` and the other public prompt shortcuts except Ship. Use `/skill:camel-ship` to preserve quoted arguments. -|=== +You can invoke all nine public skills directly. Use the syntax for your assistant in the +xref:agents.adoc#entry-points[public skill entry points table]. For example, replace `camel-start` with +`camel-debug` to troubleshoot a route. The table also explains how to invoke Ship on Pi and Qwen. Kit generates command stubs only for public skills. Claude, Bob Shell and Qwen expose the nine public entries in their command or skill pickers. Antigravity and Codex also list the four installed helpers, as do diff --git a/docs/security-model.md b/docs/security-model.md index 37d8cb66..444bc077 100644 --- a/docs/security-model.md +++ b/docs/security-model.md @@ -880,7 +880,7 @@ generated code accepted without review; destructive shell commands issued by an For the **developer** (who is also the route author and the operator of the machine): 1. **Treat analysis of a third-party tree as reading untrusted input, and treat building or running it as executing - untrusted code.** `camel-kit graph` and `init --here` only read (P1); `/camel-execute`, `/camel-verify`, + untrusted code.** `camel-kit graph` and `init --here` only read (P1). `/camel-execute` (including its internal `camel-verify` phase), `/camel-debug` and Ship validation *build and start* projects, which runs Maven plugins and Camel components. Decide that separately for anything you did not write. 2. **Keep the harness's permission model on.** Do not run Camel-Kit skills under a harness mode that skips diff --git a/docs/security-model.yaml b/docs/security-model.yaml index 8937c7f8..6b9b7ea1 100644 --- a/docs/security-model.yaml +++ b/docs/security-model.yaml @@ -434,7 +434,7 @@ attack_classes_left_downstream: - supply-chain substitution of dynamically fetched MCP servers and JBang dependencies - dependency confusion through snapshot or mirror repositories - secret exfiltration through generated configuration, test data, logs or transcripts - - build-time code execution by running an untrusted project's Maven build during verification + - build-time code execution by running an untrusted project's Maven build during verification (including the internal camel-verify phase of camel-execute) - insecure generated code accepted without review - destructive shell commands issued by an autonomous agent - exposure of an unauthenticated local MCP transport (Knowledge SSE) beyond loopback diff --git a/docs/user-guide.md b/docs/user-guide.md index 3052ed8a..a31cec44 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -310,7 +310,7 @@ flowchart TB subgraph "Internal Skills" I["camel-implement"] T["camel-test"] - R["/camel-verify (internal)"] + R["camel-verify (internal)"] end end subgraph "Phase 4: Validate" @@ -630,13 +630,13 @@ action still requires the named operator's separate execution-time authorization ## 6. Verification -### `/camel-verify` (Internal to `/camel-execute`) +### `camel-verify` (Internal to `/camel-execute`) Verification is a structured 3-phase feedback loop that builds the project, runs Citrus integration tests via `camel test run`, diagnoses errors, applies fixes, and retries until all tests pass or the iteration limit is reached. Citrus tests are self-contained: Testcontainers manage external services and `camel:jbang:run` starts the Camel integration within the test. **When it runs:** - **Automatically once** inside `/camel-execute`, after all implementation tasks and their reviews complete -- `/camel-verify` is not a standalone user-facing command. For standalone quality checks after execution, use `/camel-validate`. +- Use `/camel-debug` for standalone troubleshooting and `/camel-validate` for a static quality check. ### The 3 Phases diff --git a/kit/camel-kit-core/src/main/resources/skills/camel-execute/SKILL.md b/kit/camel-kit-core/src/main/resources/skills/camel-execute/SKILL.md index cfbab01d..bb3b6539 100644 --- a/kit/camel-kit-core/src/main/resources/skills/camel-execute/SKILL.md +++ b/kit/camel-kit-core/src/main/resources/skills/camel-execute/SKILL.md @@ -626,7 +626,9 @@ When isolation is supported, only the structured report flows back to the orches After the cross-cutting review, run the full verification loop in an isolated subagent when supported, or inline otherwise. -1. Run the verification role with: +1. Give the verifier this assignment, including when it starts with a fresh context: + "Verify the completed implementation for Execute Step 3.5 and return the structured verification report." + Supply: - The `camel-verify` skill (`skills/camel-verify/SKILL.md`) - Both guides: `verify-loop.md` and `error-taxonomy.md` - Project configuration (runtime, Camel version, module path) diff --git a/kit/camel-kit-core/src/main/resources/skills/camel-verify/SKILL.md b/kit/camel-kit-core/src/main/resources/skills/camel-verify/SKILL.md index 87a3eefa..6c1f3d37 100644 --- a/kit/camel-kit-core/src/main/resources/skills/camel-verify/SKILL.md +++ b/kit/camel-kit-core/src/main/resources/skills/camel-verify/SKILL.md @@ -17,7 +17,8 @@ Maven compilation and Citrus testing retry up to 15 times; Camel Main startup re ## Invocation - **Internal only** — run by `camel-execute` after all implementation tasks, in an isolated subagent where supported or inline otherwise -- If selected directly for a failure outside Execute, direct the user to `/camel-debug`. Start the verification loop only when Execute dispatches it. +- For the Execute Step 3.5 assignment to verify the completed implementation and return its report, run the loop with the supplied project configuration. +- For a standalone troubleshooting request, direct the user to `/camel-debug` and leave the verification loop idle. ## Prerequisites diff --git a/kit/camel-kit-core/src/main/resources/skills/camel-verify/guides/verify-loop.md b/kit/camel-kit-core/src/main/resources/skills/camel-verify/guides/verify-loop.md index 27a00f90..c62dfd89 100644 --- a/kit/camel-kit-core/src/main/resources/skills/camel-verify/guides/verify-loop.md +++ b/kit/camel-kit-core/src/main/resources/skills/camel-verify/guides/verify-loop.md @@ -1,6 +1,6 @@ # Verification Loop -Core verification guide for `/camel-verify`. Executes a 3-phase loop that builds, runs Citrus integration tests, and reports results — iterating with diagnosis and fixes until the application passes or the iteration limit is reached. +Core verification guide for `camel-verify`. Executes a 3-phase loop that builds, runs Citrus integration tests, and reports results — iterating with diagnosis and fixes until the application passes or the iteration limit is reached. **Always load `shared/context-authority.md` and `error-taxonomy.md` alongside this guide.** The shared guide governs every loaded artifact, command result, MCP response, diagnostic, summary, report, and handoff. The taxonomy contains the diff --git a/kit/camel-kit-core/src/main/resources/workflow/camel-kit-workflow.yaml b/kit/camel-kit-core/src/main/resources/workflow/camel-kit-workflow.yaml index 2a06b4c1..5b78ee21 100644 --- a/kit/camel-kit-core/src/main/resources/workflow/camel-kit-workflow.yaml +++ b/kit/camel-kit-core/src/main/resources/workflow/camel-kit-workflow.yaml @@ -100,7 +100,8 @@ commands: # Classify each core skill by the task a developer can start with it. # router: selects the workflow for a request whose next stage is undecided. -# pipeline: performs a named stage, entered directly with its inputs or by handoff. +# pipeline: performs a stage of the manual pipeline (design, plan, execute, validate) +# that a developer can enter directly with its inputs or reach by handoff. # standalone: delivers a result independently of the manual pipeline, even when a stage also uses it. # internal: supplies guides or performs work whose inputs and result belong to a calling workflow. # A public skill names its user_facing command in generated_command. Internal skills use null. diff --git a/kit/camel-kit-core/src/test/java/org/apache/camel/kit/generator/ShippedAssetStructureTest.java b/kit/camel-kit-core/src/test/java/org/apache/camel/kit/generator/ShippedAssetStructureTest.java index 658aff1e..77420a92 100644 --- a/kit/camel-kit-core/src/test/java/org/apache/camel/kit/generator/ShippedAssetStructureTest.java +++ b/kit/camel-kit-core/src/test/java/org/apache/camel/kit/generator/ShippedAssetStructureTest.java @@ -273,6 +273,12 @@ class ShippedAssetStructureTest { assertFalse(Files.exists(ctx.projectDir().resolve(legacyCommands)), agentName + " must not generate command scaffolding"); } + String skills = ctx.agent().skillsDirectory() + "/"; + assertGeneratedContains(ctx, agentName, skills + "camel-execute/SKILL.md", + "for Execute Step 3.5 and return the structured verification report"); + assertGeneratedContains(ctx, agentName, skills + "camel-verify/SKILL.md", "Execute Step 3.5", + "standalone troubleshooting", agentName.equals("codex") ? "`$camel-debug`" : "`/camel-debug`"); + assertGeneratedContains(ctx, agentName, skills + "camel-verify/guides/verify-loop.md", "`camel-verify`"); assertGeneratedContextAuthority(agentName, ctx); assertGeneratedMigrationOperationsGuides(agentName, ctx); assertGeneratedMarkdownResolvesCommandPrefix(agentName, ctx);
