davsclaus opened a new pull request, #29891:
URL: https://github.com/apache/camel/pull/29891
## What
CAMEL-26946. An integration without a README used to get the project's
`camel-summary.md` from the readme tool of the AI panel (`tui_get_readme`). An
AI wrote that file's overview, capabilities, steps and route texts, often the
same model a minute earlier. A note in the answer said so, but in a local-model
benchmark (qwen3.6:35b) the model repeated a mistake from that text as a fact:
it said an app was "validating the orders" when nothing in it validates.
## Change
- **Without a README:** the tool answers with the facts derived from the
route sources as they are now: entry points, routes, flows between routes,
error handling and external systems. The answer has `"aiWritten": false`, and
nothing an AI wrote is in it.
- **`aiSummary=true`:** returns `camel-summary.md` with its AI sections. The
answer has `"aiWritten": true`, the `model` and `date` that wrote it, and
`"upToDate": false` when the routes changed since. A project without a summary
gets the facts, with a note that there is none.
- **With a README:** nothing changes.
- **Behavior change:** a project with neither a README nor a summary now
gets the facts, where before it got "No README found".
**Code moves:**
- The answer moves to a class of its own, `ReadmeTool`, because
`TuiToolRegistry` is at the 2000-line limit of `SourceSizeTest`.
- `McpFacade` keeps only `getSourceDirectory`.
**Prompt size:** the tool text is shorter than before, so the prompt prefix
of every tool mode is about 10 tokens smaller (`AiPanelPromptBudgetTest`: core
5266 → 5257 tokens).
## Tests
- `ReadmeToolSummaryTest`, rewritten in AssertJ, has 5 tests. 4 of them fail
on the code before the change. They cover:
- the facts by default;
- the AI summary only when asked for, and saying so;
- facts that follow a changed route while the summary is out of date;
- asking for a summary that does not exist;
- a project without routes.
- The whole `camel-jbang-plugin-tui` module passes: 2574 tests, 0 failures.
_Claude Code on behalf of Claus Ibsen (davsclaus)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_012nJsFsjqqFiwroeHRWaKbS
--
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]