Docs: add LLM-assisted migration prompt callout#1394
Conversation
PR Review: Docs — LLM-assisted migration promptThis is a docs-only change, so no code risk. The idea is useful and the structure is clear. A few issues worth addressing before merging: Bugs / Rendering IssuesREADME.md — missing blank line The new sentence is appended directly after the previous line with no blank line separator: You can find [migration to React on Rails steps here](...).
For the fastest path, try the [LLM-assisted migration prompt](...).In CommonMark/GitHub Markdown, lines without a blank line between them render as a single paragraph — these two sentences will run together. Add a blank line (or an explicit Prompt Accuracy"Run tests/lint after each phase" (point 5) An LLM can't execute commands — it can only suggest them. As written, this instruction implies the assistant will run tests itself, which may confuse users about what to expect. Consider rephrasing to something like:
This also makes the migration more interactive and safer, since the LLM waits for real feedback rather than proceeding blindly. Missing Context InstructionThe prompt jumps straight to "migrate this app" without instructing the LLM to first understand the user's codebase. Most LLMs won't ask for files unless prompted. Consider adding an opener like:
Without this, the LLM may produce a generic migration rather than one tailored to the app. Minor: Hardcoded
|
PR Review: Docs — LLM-assisted migration promptOverall this is a clean, docs-only addition that helps users take action on the migration advice already in the repo. A few observations: Strengths
Concerns / Suggestions1. The prompt URL assumes web browsing capability Many coding assistants (offline IDEs, restricted environments, older API integrations) can't fetch URLs at inference time. A user following this literally with a non-browsing assistant will get an LLM that silently invents migration steps. Suggestion: add a brief note before the code block, e.g.:
2. No instruction to provide codebase context The prompt says "Migrate this app" but doesn't tell the user how to give the LLM visibility into their files. Without that context the model has to guess at the app's structure. A one-liner like:
would make the template significantly more actionable. 3. Not every react-rails app uses Shakapacker — some still use Webpacker or plain importmap/jsbundling-rails. If a user follows the prompt and their app doesn't have Shakapacker, this will fail and might confuse them mid-migration. Consider qualifying it: Minor nits
Summary: Docs are correct and the intent is solid. The main actionable items are the web-browsing caveat (#1) and the Shakapacker qualifier (#3). #2 would noticeably improve usability. Happy to see this merged with or without those tweaks — they're suggestions, not blockers. |
PR Review: Docs — LLM-assisted migration promptThis is a docs-only change and is generally well-structured. Here are a few observations: Positive
Issues / Suggestions1. Floating note before the code block (minor UX issue) The sentence:
…appears as plain paragraph text between the intro and the code fence, making it easy to overlook. Consider formatting it as a callout so it stands out: > **Note:** If your assistant cannot browse URLs, paste this migration guide content directly into the prompt context before running the template.2. Hardcoded The prompt includes: This is intentional (so users copy a stable, resolvable URL), but it means the in-prompt URL and the actual guide can silently diverge. A short comment alongside the code block noting "update this URL to a tagged release when using a pinned version" would help maintainers remember to keep it in sync during future releases. 3. Final safety reminder could be more visible
> **Warning:** Always review all generated diffs before merging. LLM output can introduce subtle regressions.4. README link placement (very minor) The new README line: For the fastest path, try the [LLM-assisted migration prompt](...).sits between the existing migration-guide sentence and the You can find [migration to React on Rails steps here](...), including an [LLM-assisted migration prompt](...) for a faster first pass.SummaryThis is a useful, low-risk addition to the docs. The structural issues above are all minor polish items — none are blockers. The prompt template itself is solid and follows good LLM-prompting practices (phased work, explicit pause points, rollback instructions). |
|
Addressed the review suggestions in commit |
Summary
Why
This makes the migration path to react_on_rails feel faster and more actionable, while still encouraging review and test validation.
Testing