# Polishing the catalog (and reading the agent's receipts)

> Source: <https://dev.to/avdev4j/polishing-the-catalog-and-reading-the-agents-receipts-2c0g>
> Published: 2026-05-27 21:42:51+00:00

OtakuShelf models everything now, but it's a prototype with prototype habits: the anime entities Sam added last week aren't paginated, there are no DTOs anywhere, and — Sam just noticed while adding *Attack on Titan* — there's nowhere to record that a franchise comes from Japan vs. Korea vs. wherever. Time for a polish pass. And since OtakuShelf is a real project Sam has hand-tweaked, this is also where a safety net earns its keep.

First, consistency. Sam wants pagination on the new anime entities too, and a DTO + service layer across the board so the API isn't exposing entities directly:

In

`/Users/sam/projects/otakushelf`

, paginate every entity, and put all of them behind MapStruct DTOs and a service layer.

The agent reaches for `set_option`

, the tool for exactly these JDL option lines, and applies:

```
paginate * with pagination
dto * with mapstruct
service * with serviceClass
```

Same `dryRun`

habit from last time — Sam previews, sees it's just regenerating resource/service layers and Vue services, and applies. Nothing dramatic, which is the point: option changes should be boring.

Now the missing field. This is the moment that makes people nervous about regenerators — Sam has hand-edited the `Franchise`

Vue detail view and hasn't committed yet. Adding a field means re-running the generator with `--force`

over files Sam touched. So Sam asks for a belt **and** suspenders:

Add an

`originCountry`

(string) to`Franchise`

. Take a backup first so I can roll back if it stomps my edits.

Two things happen. The agent reads the current `Franchise`

(via the project's entities resource) and re-declares it with **all** its existing fields plus `originCountry`

— re-declaring an entity in JDL replaces it, and the agent knows not to emit a half-defined one, so title/synopsis/status/startYear survive. And because Sam asked for a backup, the server snapshots the project into a temp folder *before* the `--force`

run and hands back a paste-ready escape route:

```
Backup taken before this run: /tmp/jhipster-mcp-backup-otakushelf-9fA2
To roll back:
  cp -R "/tmp/jhipster-mcp-backup-otakushelf-9fA2/." "/Users/sam/projects/otakushelf/" && rm -rf "/tmp/jhipster-mcp-backup-otakushelf-9fA2"
```

It's a plain backup directory, not git — the MCP never touches Sam's repo. (Honestly, if Sam's tree had been clean, a commit would've done the same job; the backup is for exactly this not-committed-yet situation.) As it turns out the regeneration is clean and Sam's edit survives, so the backup goes unused — which is the best kind of safety net.

Sam doesn't take "done!" on faith. Every time the agent runs the generator, the MCP hands back two things: the human-readable output Sam knows from the terminal, *and* a small structured summary the agent actually reasons over — exit code, success flag, the list of files changed, any warnings, and (when taken) that backup path. So when the agent reports "added `originCountry`

, 9 files changed, no conflicts," it's reading those numbers off real data, not vibing. That's why Sam can trust a one-line summary instead of re-reading a wall of `create`

/`force`

lines.

For a broader sanity check, Sam asks for the dashboard:

What's the current setup of OtakuShelf — versions, database, entities?

The `info`

tool runs `jhipster info`

and lays it out: JHipster 9.0.0, PostgreSQL, and the full entity list — Franchise, BookSeries, Book, Anime, Season, Episode. Everything Sam expects, nothing it doesn't. (There was also a steady trickle of progress lines during each generation, by the way — so the longer runs never felt like a hang, just JHipster doing its thing.)

OtakuShelf is now a tidy, paginated, DTO-backed catalog of manga and anime, and Sam has a comfortable rhythm: describe the change, validate, dry-run, apply, occasionally with a backup. Then JHipster ships **9.1.0**. In the old days that release note would trigger a small dread. Next, Sam finds out whether an agent makes a version upgrade boring too.

*Next in the series: "Upgrading OtakuShelf to JHipster 9.1.0" — scoping and previewing a version bump, git-free, before a single file changes.*
