davsclaus opened a new pull request, #27103: URL: https://github.com/apache/camel/pull/27103
_Claude Code on behalf of davsclaus_ JIRA: [CAMEL-25143](https://issues.apache.org/jira/browse/CAMEL-25143) (AI project overview) and [CAMEL-25147](https://issues.apache.org/jira/browse/CAMEL-25147) (Diagram tab architecture view) ## Why A project with many routes is hard to understand from a route diagram alone. The topology turns into spaghetti, and route ids rarely say what a route does for the business. This PR adds an overview of a Camel project at the source level, like some iPaaS products have, and uses an LLM to describe it. The idea was inspired by the third-party [camel-flow](https://github.com/donvito/camel-flow) viewer and is folded into the ASF Camel CLI, MCP and TUI here, with the TUI as the prototype. The key rule is that **facts and AI stay apart**. What the analyzer finds in the sources is shown as fact. What an AI adds is always marked `✦` and styled as AI-assisted, so it is never taken for what the source or the runtime says. ## CAMEL-25143 - AI project overview - **Analyzer** (`camel-jbang-core`, `commands.ai`). It reads YAML and XML structurally, and Java with a marked heuristic; see the follow-up below. It finds: - routes, and the links between them: call, async, event and shared, plus error paths; - external systems, named by their catalog label; - entry points, marked internal when the catalog says the component is not remote; - findings. - **Integration summary.** `camel-summary.md` is written in the project and holds: - an overview, capabilities, utility routes, and route descriptions as a short label plus a note, all from the AI; - an architecture map, entry points, flows, external systems and findings, all facts. The AI sections are fenced and headed `✦ AI-assisted`. A fingerprint of the route files tells when the summary is out of date. - **CLI.** `camel overview [dir] [--ai] [--save] [--apply-descriptions] [--format=json]`. It is listed under AI in `camel --help`. Route descriptions go into the sources (YAML `description:`, XML attribute, Java `.routeDescription`) only on request. - **MCP tools.** `camel_project_overview` and `camel_save_project_summary`, on both the Quarkus MCP server and the TUI's. - **TUI.** - `/overview [refresh|show|apply]`; - the *AI Overview* setting: manual (the default), auto or off; - the summary opens like a README (`s`); - AI-assisted labels and notes appear in the Routes tab, the Diagram tab and the route Info panel. They use a new optional theme token, `ai-assisted`. ## CAMEL-25147 - Diagram tab: Architecture › Topology › Route - **Level bar.** A level bar above the diagram shows where you are (`v`, `Enter`, `Esc`) and the view settings of that level. The footer lists only actions. - **Architecture level.** Routes are grouped by what they do: - route groups from the source, which always win; - AI capabilities; - shared services, derived from the links; - utility routes: error paths, log-only routes, or routes the AI marked; - Other. The level has an Info panel and a *Routes* mini panel showing the selected group's routes as a tree. `Enter` goes down to the topology of all routes, with the group's routes highlighted. - **Settings:** - `a` ai: shows the AI-assisted parts, or the facts alone. With no summary yet, it has the AI write one. - `b`: business or technical view. - `u` utility routes: one setting shared by the Architecture and the Topology. - `g` groups in the topology: tags, the colours of the architecture, and a legend. - `e` external systems: in the Architecture, boxes linked to the groups that use them, each with an Info panel. - **Topology.** Boxes widen, within a cap, so a label and its group tag fit. The route Info panel shows the route's group. ## Tests and docs - New tests in camel-jbang-core cover the analyzer, the summary format, labels and notes, descriptions written into the sources, and the grouping. New TUI tests cover the architecture view, the level bar, route groups, the mini panel, the summary viewer and the topology labels. - camel-jbang-core, camel-jbang-plugin-tui and camel-jbang-mcp build and their tests pass locally. - Docs updated: `camel-jbang-ai.adoc` (Project overview), `camel-jbang-mcp.adoc`, `camel-jbang-tui.adoc`, the TUI's F1 help, and the generated `camel-jbang-overview.adoc`. - Verified end to end with a local Ollama model (qwen3.6:35b-a3b), via the CLI with `--ai` and the TUI, and through MCP. ## Follow-up - [CAMEL-25148](https://issues.apache.org/jira/browse/CAMEL-25148): a lightweight Java source → model parser to replace the regex Java reader in the analyzer. 🤖 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]
