You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2026/09/20 23:34:11 UTC

(cayenne) branch master updated: fixing Claude instructions

This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git


The following commit(s) were added to refs/heads/master by this push:
     new c74d90c8e fixing Claude instructions
c74d90c8e is described below

commit c74d90c8e378798ed0c597f741c4c8a0b39881b0
Author: Andrus Adamchik <an...@objectstyle.com>
AuthorDate: Sun Sep 20 19:34:05 2026 -0400

    fixing Claude instructions
---
 .../asciidoc/_getting-started-guide/classes.adoc   |  5 ++--
 .../asciidoc/_getting-started-guide/import.adoc    | 33 +++++++++++++---------
 .../asciidoc/_getting-started-guide/setup.adoc     | 13 +++++++--
 .../docs/asciidoc/_getting-started-guide/sync.adoc | 23 +++++++--------
 4 files changed, 41 insertions(+), 33 deletions(-)

diff --git a/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/classes.adoc b/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/classes.adoc
index 86172984b..e2fcb07d7 100644
--- a/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/classes.adoc
+++ b/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/classes.adoc
@@ -39,10 +39,9 @@ Save the project, as the class generation settings are also a part of it.
 
 === With Claude
 
-[quote]
-____
+----
 Generate Java classes from the Cayenne model.
-____
+----
 
 === Inspecting and Customizing the Classes
 
diff --git a/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/import.adoc b/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/import.adoc
index 730381c99..bc4b61935 100644
--- a/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/import.adoc
+++ b/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/import.adoc
@@ -85,17 +85,22 @@ committed to the version control system along with the rest of your code.
 
 === With Claude
 
-Start Claude Code in the tutorial project directory and ask it to do the import:
-
-[quote]
-____
-Create a Cayenne project in `src/main/resources` and import the `cayenne_demo` MySQL database into it.
-Use `org.example.cayenne.persistent` as the Java package.
-____
-
-Claude does not know how to connect to your database, and it should not. So the first time it opens the project in
-CayenneModeler, and asks you to enter the connection settings on the "DB Import" tab, exactly as described in
-"Connect to the Database" above (this includes installing the JDBC driver). Once you save the connection, tell Claude
-to continue. It runs the import using the connection stored in the Modeler preferences, and reports the entities
-that were added to the model. The project files are the same as the ones created with the Modeler, so from here
-on you can mix the two approaches.
+With the `apache-cayenne` plugin installed (see <<Claude Code (optional)>>), Claude already knows how to do most of the
+steps in this tutorial, so you only need to describe what you want. There is one exception though.
+Claude does not know how to connect to your database, and it should not. The connection settings (including the
+password) are kept in the CayenneModeler preferences on your machine, and the Cayenne MCP server uses them to run
+the import on Claude's behalf. So start in the Modeler, following these steps from the previous section:
+
+- <<Install the JDBC Driver>>
+- <<Create a Project and a DataMap>>
+- <<Connect to the Database>>
+- <<Save the Project>> (you haven't imported anything yet, but Claude needs the project files to work with)
+
+Now start Claude Code in the tutorial project directory and ask it to do the import:
+
+----
+Import the "cayenne_demo" MySQL database into the Cayenne project in src/main/resources
+----
+
+Claude runs the import using the connection saved by the Modeler, and reports the entities that were added to the
+model. The result is the same as with "Run Import" in the Modeler, so from here on you can mix the two approaches.
diff --git a/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/setup.adoc b/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/setup.adoc
index a3b407394..99b526a9b 100644
--- a/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/setup.adoc
+++ b/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/setup.adoc
@@ -39,9 +39,16 @@ image::modeler-started.png[align="center",width=800]
 
 ==== Claude Code (optional)
 
-To follow the "With Claude" alternatives, install Claude Code, the `apache-cayenne` plugin and the Cayenne MCP server,
-as described in the link:/docs/{project-major-version}/cayenne-guide/agentic-coding/[Agentic Coding] chapter of the
-Cayenne Guide. The MCP server comes with CayenneModeler, so you still need to download the Modeler.
+To follow the "With Claude" alternatives, install Claude Code and make it Cayenne-aware with the two pieces described in the
+link:/docs/{project-major-version}/cayenne-guide/agentic-coding/[Agentic Coding] chapter of the Cayenne Guide:
+
+- The link:/docs/{project-major-version}/cayenne-guide/apache-cayenne-claude-code-plugin/[`apache-cayenne` Claude Code plugin].
+It gives Claude the skills for most of the steps in this tutorial - importing the database and keeping the model in sync
+with it, cleaning up the names in the model, editing the model, generating Java classes, as well as writing queries and
+setting up Cayenne runtime in the application code.
+- The link:/docs/{project-major-version}/cayenne-guide/cayenne-mcp-server/[Cayenne MCP server], that the plugin skills
+use to run the DB import and the class generation, and to open CayenneModeler. It comes with CayenneModeler, so you still
+need to download the Modeler.
 
 ==== MySQL
 
diff --git a/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/sync.adoc b/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/sync.adoc
index 3ea9466c8..259411ce8 100644
--- a/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/sync.adoc
+++ b/docs/getting-started-guide/src/docs/asciidoc/_getting-started-guide/sync.adoc
@@ -41,10 +41,9 @@ A new DbEntity and a new ObjEntity are in place, as well as a new `foundedDate`
 
 ==== With Claude
 
-[quote]
-____
+----
 My database schema has changed. Sync the Cayenne model with the database.
-____
+----
 
 === Customizing the Model
 
@@ -65,11 +64,10 @@ Save the project. If you run the import again now, it finds nothing to do, and y
 
 With Claude simply describe the change:
 
-[quote]
-____
-In the Cayenne model rename the `id` relationship of `Painting` to `info`, and change the delete rule of `Artist.paintings`
-to "Cascade".
-____
+----
+In the Cayenne model rename the "id" relationship of "Painting" to "info",
+and change the delete rule of "Artist.paintings" to "Cascade".
+----
 
 === Filtering
 
@@ -105,8 +103,7 @@ Save the project to keep the new rules.
 
 ==== With Claude
 
-[quote]
-____
-Exclude the `legacy_painting_info` table and all the `__service_column` columns from the Cayenne DB import,
-then sync the model with the database.
-____
+----
+Exclude the "legacy_painting_info" table and all the "__service_column" columns
+from the Cayenne DB import, then sync the model with the database.
+----