{"slug": "adding-the-anime-side-without-holding-my-breath", "title": "Adding the anime side without holding my breath", "summary": "OtakuShelf developer Sam added anime entities—Anime, Season, and Episode—to the existing manga-focused project using JHipster's MCP tooling. Sam avoided the risk of clobbering live data by following a three-step workflow: validate the entity shape, preview changes via a dry-run that generates in a temporary directory without touching the real project, and only then apply the changes. The approach ensured that cross-cutting updates to the Franchise entity were reviewed and safe before execution.", "body_md": "A week later, OtakuShelf has a few franchises and their manga in it. Now Sam wants the other half: anime. That means new entities — `Anime`\n\n, `Season`\n\n, `Episode`\n\n— wired into the existing `Franchise`\n\n. The difference from last time is important: this is a **live project** with data and a model Sam cares about. Running the generator blind on it is how you end up with a clobbered entity and a bad afternoon. So Sam slows down by exactly one habit: preview first.\n\nBefore even applying, Sam sketches the new shape and asks the agent to validate it:\n\nValidate this without changing anything: an\n\n`Anime`\n\n(title, studio) linked many-to-one to`Franchise`\n\n, a`Season`\n\n(number, title, episode count) under an anime, and an`Episode`\n\n(number, title, air date, duration in minutes) under a season.\n\nThe `validate_jdl`\n\ntool runs a fast local lint first (is the JDL even well-formed?), then *generates the whole thing in a throwaway directory* and reports any error — all without touching OtakuShelf. It comes back clean. Good: the idea is sound. Now, what would it actually *do* to the project?\n\nHere's the part every JHipster veteran needs to hear, because it bit us too: in **JHipster 9, --dry-run still writes files.** It only prints conflicts. So you cannot trust that flag to keep your project pristine.\n\nThe MCP sidesteps the whole problem. When Sam asks for a preview:\n\nIn\n\n`/Users/sam/projects/otakushelf`\n\n, show me what adding the anime entities and their relationships would change — don't write anything yet.\n\n…the agent calls the apply tool with `dryRun: true`\n\n, and the server does something more honest than a flag: it makes a temp directory, copies OtakuShelf's `.yo-rc.json`\n\nand existing entities into it for fidelity, generates *there*, lists what would change, and throws the temp away. The real project sees **zero** writes. Sam reads the file list — new `Anime`\n\n, `Season`\n\n, `Episode`\n\nsources, updated Liquibase changelogs, a couple of Vue components — nods, and only *then* drops the `dryRun`\n\n. The exact same call, now for real.\n\nThis is the rhythm Sam settles into for the rest of the project: **validate → dry-run → apply.** It costs a few seconds and removes all the adrenaline.\n\nThere's a quieter thing happening that makes this safe. When Sam says \"link `Anime`\n\nto `Franchise`\n\n,\" the agent doesn't guess what `Franchise`\n\nlooks like — it reads the project's current entities through a resource (`jhipster://project/entities`\n\n). So it knows `Franchise`\n\nalready exists with its title/synopsis/status/startYear, and it adds the relationship *without* redefining and accidentally trimming those fields. It's working from the real model, not from a fuzzy memory of last week's chat.\n\nFor this batch Sam lets the agent do it all in one shot — three new entities and their relationships belong together, so the agent composes a single `import_jdl`\n\ncall instead of three separate ones:\n\n```\nentity Anime { title String required, studio String }\nentity Season { number Integer required min(1), title String, episodeCount Integer min(0) }\nentity Episode { number Integer required min(1), title String, airDate LocalDate, durationMinutes Integer min(0) }\n\nrelationship OneToMany {\n  Franchise{animes} to Anime{franchise}\n  Anime{seasons} to Season{anime}\n  Season{episodes} to Episode{season}\n}\n```\n\nOne generator run, one diff to review. (If Sam had wanted just a single entity, there's an `add_entity`\n\ntool that builds the JDL from a plain description — handy for one-offs. For a coordinated batch like this, one `import_jdl`\n\nis tidier and faster.)\n\nThe anime side *touches* the manga side — `Franchise`\n\ngains an `animes`\n\ncollection. That's precisely the kind of cross-cutting change where a blind regeneration makes you nervous. With the dry run, Sam saw in advance that `Franchise.java`\n\nand its Vue views would be regenerated, confirmed nothing surprising was in the list, and proceeded with a clear conscience. The MCP didn't make the change safe by being clever; it made it safe by letting Sam *look first*, for free, as many times as wanted.\n\nOtakuShelf now models both halves of a franchise — manga and anime — from `Franchise`\n\ndown to individual `Episode`\n\ns. It works, but it's a little rough: no DTOs, and Sam already realized a field is missing. Next, the polish pass — and a look at how to read what the agent actually did to your code.\n\n*Next in the series: \"Polishing the catalog (and reading the agent's receipts)\" — options, a forgotten field with a backup, and trusting what the agent did.*", "url": "https://wpnews.pro/news/adding-the-anime-side-without-holding-my-breath", "canonical_source": "https://dev.to/avdev4j/24-adding-the-anime-side-without-holding-my-breath-1617", "published_at": "2026-05-27 21:42:34+00:00", "updated_at": "2026-05-27 22:10:58.708907+00:00", "lang": "en", "topics": ["ai-tools"], "entities": ["OtakuShelf", "JHipster", "Sam", "MCP"], "alternates": {"html": "https://wpnews.pro/news/adding-the-anime-side-without-holding-my-breath", "markdown": "https://wpnews.pro/news/adding-the-anime-side-without-holding-my-breath.md", "text": "https://wpnews.pro/news/adding-the-anime-side-without-holding-my-breath.txt", "jsonld": "https://wpnews.pro/news/adding-the-anime-side-without-holding-my-breath.jsonld"}}