davsclaus opened a new pull request, #29740:
URL: https://github.com/apache/camel/pull/29740

   ## Description
   
   [CAMEL-25672](https://issues.apache.org/jira/browse/CAMEL-25672): the server 
instructions of camel-jbang-mcp (CAMEL-25646) came from an evaluation of agents 
migrating legacy integrations to Camel. Most people who use the server work on 
an existing Camel project every day, and migration is a one-time task. So the 
default instructions now serve everyday work, and the migration guidance is 
there when a migration starts.
   
   **Default instructions (2,724 of the 4,096 characters Claude Code loads):**
   - The first line says what the server is for: building, running and fixing 
the routes of a Camel project.
   - Rules for writing routes, from the local-model benchmark: the steps of an 
EIP go under its `steps`; a `choice` has one `when` list; `onException`, 
`errorHandler` and `routeConfiguration` are top-level entries and `handled` is 
an expression; a value the route keeps for itself goes in a variable; Simple 
operators go between functions; after a write, read its answer for the reload 
and the log. Components by URI scheme (`platform-http`) stays.
   - The daily tools, which the old text never named: `camel_get_files`, 
`camel_edit_file`, `camel_write_file`, `camel_run`, `camel_control`, 
`camel_get_log`, `camel_get_errors`, `camel_eval_expression`.
   - The catalog map and the Citrus lines (CAMEL-26493, CAMEL-26495) stay.
   - The last line points to the migration guidance.
   
   **Migration guidance on demand:**
   - The rules that only matter in a migration move out of the default text: 
`smtp`, not `mail`; the mail `useHeader*` options; removing `Camel*` headers 
before an http or mail call; `xslt` parameters; the port and `--dep` of `camel 
run`. They are followed by a short workflow.
   - New prompt `camel_migrate_to_camel` (optional `source` argument), next to 
`camel_migrate_project`, which is for upgrades between Camel versions.
   - New tool `camel_migration_instructions`, which returns the same text for 
clients that use tools but no prompts. Its description says to call it once at 
the start of a migration.
   - Both texts live in `McpServerInstructions`, so they can be reviewed in one 
place.
   
   Not in this PR: the optional SKILL.md, and the migration profile of 
CAMEL-25537 (blocked by CAMEL-25639).
   
   ## Testing
   
   - `McpServerInstructionsTest`: the size and first line, the order of the 
rules, that the migration-only rules are not in the default text, the migration 
text, and that every tool and prompt either text names exists and is listed in 
`MAPPED_TOOLS`, `MAPPED_PROMPTS` or `MIGRATION_TOOLS`.
   - `PromptDefinitionsTest` and `MigrationToolsTest` cover the new prompt and 
tool.
   - The camel-jbang-mcp suite passes locally (548 of 549). The one failure, 
`AuthoringToolsTest.aThirdIdenticalValidationOfTheSameContentGetsAShortNote`, 
comes from a local camel-jbang-core jar older than CAMEL-26875 (#29697), which 
changed that note on main today. It is unrelated to this change.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to