atiaomar1978-hub commented on code in PR #25409:
URL: https://github.com/apache/camel/pull/25409#discussion_r3742019013


##########
archetypes/camel-archetype-java/src/main/resources/archetype-resources/AGENTS.md:
##########
@@ -0,0 +1,27 @@
+# AGENTS.md
+
+Guidance for AI coding assistants working on this project, which was generated 
from the
+`camel-archetype-java` Maven archetype.
+
+## Start here
+
+- Apache Camel LLM index: https://camel.apache.org/llms.txt
+- Any Apache Camel documentation page is available as LLM-friendly Markdown by 
replacing `.html` with `.md` in its URL.
+- Prefer the Camel CLI and the Camel MCP server (both linked from the index 
above) to look up components, their endpoint options and the catalog. Do not 
invent component URIs or options — verify them against the catalog or the 
documentation.
+
+## Project layout
+
+- `src/main/java/MyRouteBuilder.java` — the Camel routes.
+- `src/main/java/MainApp.java` — starts the application via 
`org.apache.camel.main.Main`.
+- `src/main/resources/log4j2.properties` — logging.
+- `src/data` — sample messages consumed by the generated route.
+
+## Build and run
+
+- Build: `mvn install`
+- Run: `mvn camel:run`
+
+## Conventions
+
+- Add routes as `RouteBuilder` classes and register them with `Main` (or let 
component scanning pick them up).

Review Comment:
   `MainApp` registers routes explicitly via 
`main.configure().addRoutesBuilder(new MyRouteBuilder())` — there is no 
component/package scanning in this archetype.
   
   Suggest: *"Add routes as `RouteBuilder` classes and register them on `Main` 
the same way as `MyRouteBuilder`."* Drop the scanning clause to avoid 
misleading agents.



##########
archetypes/camel-archetype-java/src/main/resources/archetype-resources/README.md:
##########
@@ -0,0 +1,21 @@
+# Camel Java Router Project
+
+A standalone Apache Camel application generated from the 
`camel-archetype-java` Maven archetype.
+Routes live in `src/main/java/MyRouteBuilder.java` and are started by 
`src/main/java/MainApp.java`.

Review Comment:
   Same packaged-layout issue as `AGENTS.md`: with `packaged="true"`, routes 
and `MainApp` live under `src/main/java/<package>/`, not directly under 
`src/main/java/`. Align README with the actual generated tree.



##########
archetypes/camel-archetype-java/src/main/resources/archetype-resources/AGENTS.md:
##########
@@ -0,0 +1,27 @@
+# AGENTS.md
+
+Guidance for AI coding assistants working on this project, which was generated 
from the
+`camel-archetype-java` Maven archetype.
+
+## Start here
+
+- Apache Camel LLM index: https://camel.apache.org/llms.txt
+- Any Apache Camel documentation page is available as LLM-friendly Markdown by 
replacing `.html` with `.md` in its URL.
+- Prefer the Camel CLI and the Camel MCP server (both linked from the index 
above) to look up components, their endpoint options and the catalog. Do not 
invent component URIs or options — verify them against the catalog or the 
documentation.
+
+## Project layout
+
+- `src/main/java/MyRouteBuilder.java` — the Camel routes.

Review Comment:
   These paths omit the package directory. The java sources fileSet uses 
`packaged="true"`, so generated projects place classes under 
`src/main/java/<package>/MyRouteBuilder.java` and `.../MainApp.java`, not at 
the `src/main/java/` root.
   
   Please use `<package>/MyRouteBuilder.java` (or 
`src/main/java/<package>/...`) so agents don't create default-package files.



##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc:
##########
@@ -0,0 +1,24 @@
+= Apache Camel 4.x Upgrade Guide
+
+This document is for helping you upgrade your Apache Camel application
+from Camel 4.x to 4.y. For example, if you are upgrading Camel 4.0 to 4.2, 
then you should follow the guides
+from both 4.0 to 4.1 and 4.1 to 4.2.
+
+[NOTE]
+====
+https://github.com/apache/camel-upgrade-recipes/[The Camel Upgrade Recipes 
project] provides automated assistance for some common migration tasks.
+Note that manual migration is still required.
+See the xref:camel-upgrade-recipes-tool.adoc[documentation] page for details.
+====
+
+== Upgrading Camel 4.22 to 4.23

Review Comment:
   Creating/linking the 4.23 upgrade guide while `main` is still on 
`4.22.0-SNAPSHOT` may be premature (see @davsclaus feedback on similar PRs). 
Fine to keep the file in this PR, but consider holding merge until `main` is 
bumped to 4.23 — otherwise the index advertises a 4.23 guide from a 4.22 tree.



##########
archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/AGENTS.md:
##########
@@ -0,0 +1,29 @@
+# AGENTS.md
+
+Guidance for AI coding assistants working on this project, which was generated 
from the
+`camel-archetype-api-component` Maven archetype.
+
+## Start here
+
+- Apache Camel LLM index: https://camel.apache.org/llms.txt
+- Any Apache Camel documentation page is available as LLM-friendly Markdown by 
replacing `.html` with `.md` in its URL.
+- Prefer the Camel CLI and the Camel MCP server (both linked from the index 
above) to look up components, their endpoint options and the catalog. Do not 
invent component URIs or options — verify them against the catalog or the 
documentation.
+
+## Project layout
+
+This is a multi-module project:
+
+- `*-api` — the Java API that this component proxies.
+- `*-component` — the Camel component generated from that API.
+- `*-component/signatures` — the API signature files consumed by 
`camel-api-component-maven-plugin`.
+
+## Build and test
+
+- Build: `mvn install` from the project root (the `*-api` module must be built 
before the `*-component` module).
+- Test: `mvn test`
+
+## Conventions
+
+- The endpoint configuration and the API method proxies are generated at build 
time from the API signatures — change the API or the signature files rather 
than editing generated sources.
+- Annotate the endpoint with `@UriEndpoint` and its options with `@UriPath`, 
`@UriParam` and `@Metadata`.

Review Comment:
   Minor clarity: line 27 says proxies/config are generated — this line then 
says "Annotate the endpoint with `@UriEndpoint`..." which could imply editing 
generated code.
   
   Suggest splitting: hand-written endpoint/configuration classes may use 
`@UriEndpoint` / `@UriParam`; generated API proxies and collections from 
`camel-api-component-maven-plugin` should not be hand-edited.



##########
archetypes/camel-archetype-dataformat/src/main/resources/archetype-resources/AGENTS.md:
##########
@@ -0,0 +1,27 @@
+# AGENTS.md
+
+Guidance for AI coding assistants working on this project, which was generated 
from the
+`camel-archetype-dataformat` Maven archetype.
+
+## Start here
+
+- Apache Camel LLM index: https://camel.apache.org/llms.txt
+- Any Apache Camel documentation page is available as LLM-friendly Markdown by 
replacing `.html` with `.md` in its URL.
+- Prefer the Camel CLI and the Camel MCP server (both linked from the index 
above) to look up components, their endpoint options and the catalog. Do not 
invent component URIs or options — verify them against the catalog or the 
documentation.
+
+## Project layout
+
+- `src/main/java` — the `org.apache.camel.spi.DataFormat` implementation.
+- `src/test/java` — tests based on `CamelTestSupport`.
+
+## Build and test
+
+- Build: `mvn install`
+- Test: `mvn test`
+
+## Conventions
+
+- Implement both `marshal` and `unmarshal`, and stream from the given 
`InputStream`/`OutputStream` instead of buffering whole messages where possible.

Review Comment:
   Worth adding the actual registration hook from the generated template: 
`@org.apache.camel.spi.annotations.Dataformat("<scheme>")` on the `DataFormat` 
class (plus keeping `getDataFormatName()` in sync). This archetype does not use 
a `META-INF/services` file — agents may invent one without this hint.



##########
archetypes/camel-archetype-main/src/main/resources/archetype-resources/AGENTS.md:
##########
@@ -0,0 +1,29 @@
+# AGENTS.md
+
+Guidance for AI coding assistants working on this project, which was generated 
from the
+`camel-archetype-main` Maven archetype.
+
+## Start here
+
+- Apache Camel LLM index: https://camel.apache.org/llms.txt
+- Any Apache Camel documentation page is available as LLM-friendly Markdown by 
replacing `.html` with `.md` in its URL.
+- Prefer the Camel CLI and the Camel MCP server (both linked from the index 
above) to look up components, their endpoint options and the catalog. Do not 
invent component URIs or options — verify them against the catalog or the 
documentation.
+
+## Project layout
+
+- `src/main/java/MyRouteBuilder.java` — the Camel routes.

Review Comment:
   The main archetype also uses `packaged="true"` for Java sources. Listing 
flat `src/main/java/MyRouteBuilder.java`, `MyApplication.java`, etc. will 
mislead agents — please document `src/main/java/<package>/...` (same for the 
test class on line 18).



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