PM Page Editor
A conversational workflow for non-technical team members to update frontend pages through natural language. The agent guides the user through each step, asking questions and confirming decisions before acting.
Who This Is For
Product managers, designers, marketers, or anyone who needs to make content or minor visual changes to frontend pages without writing code.
What Changes Are Supported
| Category | Examples |
|---|---|
| Text & copy | Headlines, descriptions, button labels, FAQ answers, testimonials |
| Pricing | Plan names, prices, feature lists, CTA labels |
| Styling | Colors, font sizes, spacing, border radius, backgrounds |
| Minor layout | Reordering items, adding/removing list entries, showing/hiding sections |
| Assets | Swapping image references, updating alt text |
| i18n / content files | Translation strings, MDX content, JSON/YAML data files |
Out of scope — if the request falls into these categories, explain clearly why it needs a developer and offer to help create a ticket instead:
- Adding entirely new pages or routes
- Adding new dependencies
- Modifying build configuration or environment variables
- Backend, API, or database changes
- Complex interactive behavior or new state logic
- Changes to files in protected paths (see config)
Interaction Style
This is a conversation, not a script. The user is non-technical. Follow these rules at all times:
- Use plain language. Never say "JSX", "component", "data array", or "Tailwind class" to the user. Say "the headline text", "the pricing section", "the button color."
- Ask, don't assume. If the user says "make it bigger" — ask how big. If they say "change the color" — ask which color. Offer concrete options using AskQuestion when available.
- Confirm before every edit. Always describe what you're about to change and get a "yes" before touching any file.
- Explain what happened. After each action, tell the user what you did in plain words.
- One thing at a time. If the user asks for multiple changes, handle them one by one, confirming each.
Workflow
Phase 1: Understand what they want (ALWAYS do this)
Goal: end this phase with a clear, confirmed list of changes.
Start by reading .pm-editor.yml from the repo root (if it exists) for project hints. See config-reference.md for the schema. Then discover the project structure silently (framework, pages, styling — see Discovery Reference below). Do NOT tell the user about frameworks or configs.
Then engage the user. Even if the request seems clear, always confirm your understanding by restating it back:
"Just to make sure I've got this right — you want to [description of change]. Is that correct?"
If the request is missing any of these, ask for them using AskQuestion when available:
- Which page? — If the project has multiple pages, ask which one. Show them as friendly names ("landing page", "pricing page", "about page"), not file paths.
- Which section? — If the page has multiple sections, ask which one. Read the page file and list sections in plain language ("the hero area at the top", "the pricing cards", "the FAQ section").
- What exactly should change? — Get the exact new text, the exact color, the exact price. Don't proceed with vague instructions.
- Anything else? — Ask if there are other changes they want to make on the same page, so you can batch them into one PR.
Example conversation:
PM: "Update the pricing on the landing page"
Agent: "Sure! I can see the landing page has three pricing plans: Starter ($0), Pro ($12), and Enterprise ($49). Which plan do you want to update, and what should the new price be?"
PM: "Pro should be $15"
Agent: "Got it — I'll change the Pro plan from $12/month to $15/month. Should I update anything else about the Pro plan (like its features or description), or is it just the price?"
PM: "Just the price"
Agent: "Perfect. Before I make the change, let me confirm: Change the Pro plan price from $12 to $15 per user per month. Everything else stays the same. Good to go?"
Phase 2: Prepare the workspace
Goal: get on a clean branch ready for edits.
Do this silently, but stop and talk to the user if there's a problem:
- Run
git status— if dirty, ask:"There are some pending changes in the code. I'll need to set those aside temporarily to make your update cleanly. Is that okay?"
- Identify the base branch (from config
pr.base_branch, or detectmain/master) - Create a new branch:
git checkout -b <prefix>/<description>(prefix from config, defaultcontent/) - Check
gh auth status— if not authenticated, explain in plain terms:"I need access to GitHub to create a review request for your change. Could you ask a developer to run
gh auth loginon this machine? Then we can try again."
If everything is clean, don't mention any of this to the user — just proceed.
Phase 3: Show the plan and get approval
Goal: user explicitly approves the exact changes before any file is edited.
Read the target file(s). Then describe each change in plain language and ask for approval:
"Here's what I'm going to change:
- Pro plan price: '$12' becomes '$15'
Does this look right? Should I go ahead?"
For text changes, always show the exact before and after wording. For styling changes, describe the visual effect ("the button will change from purple to green"). For structural changes, describe what will appear differently ("a new FAQ entry will appear at the bottom of the list").
Use AskQuestion to let them approve or request adjustments:
- "Yes, make the change"
- "No, let me adjust something first"
Do NOT edit any file until the user says yes.
Phase 4: Make the changes and verify
Goal: apply edits and make sure nothing broke.
- Edit only the files needed, changing only what was approved
- Respect the framework's file patterns (see Discovery Reference below)
- Check protected paths from config — if a needed file is protected, tell the user:
"That section lives in a protected file that only developers should change. Want me to help you write up a request for the dev team instead?"
- Run verification commands (detect from
package.jsonscripts or config):- Lint (if available)
- Type-check (if TypeScript)
- Build
- If verification fails, explain in plain language:
"The change caused a small technical issue — [simple explanation]. I can fix it automatically / This will need a developer to look at. What would you prefer?"
Phase 5: Preview and confirm
Goal: user sees (or understands) the result and gives final approval.
- Start the dev server if not already running
- Tell the user where to look:
"Your change is ready to preview! Open http://localhost:5173 and scroll to the pricing section. The Pro plan should now show $15/month."
- Ask for final confirmation:
"Does everything look good? Should I send this off for developer review?"
Offer options:
- "Looks great, create the review request"
- "I want to tweak something" (go back to Phase 3)
- "Never mind, undo everything" (reset the branch)
Phase 6: Create the PR
Goal: a clean PR is created and the user has a link.
- Stage and commit with a descriptive message
- Push:
git push -u origin HEAD - Create the PR with
gh pr create:
Title: [Content] Short description of the change
Body:
## What Changed
| Section | Before | After |
|---------|--------|-------|
| Pro plan price | $12/user/month | $15/user/month |
## Requested By
[User's name/role if mentioned]
## Review Notes
- Content/styling changes only — no logic or dependency changes
- Please verify on desktop and mobile
- Sections affected: [list sections]
- Add reviewers from config:
gh pr edit --add-reviewer - Add labels from config:
gh pr edit --add-label
Phase 7: Wrap up
Goal: user knows what happens next.
Tell the user in friendly terms:
"All done! Here's your change request: [PR link]
What I changed: Updated the Pro plan price from $12 to $15. What happens next: [Reviewer names] will review it. Once they approve, the change goes live. Need to undo this? Just tell me 'undo my last change' and I'll take care of it."
Handling Rollbacks
If the user says "undo my last change" or "revert the previous update":
- Ask which change they mean (or find the most recent
content/PR) - Confirm what they want to undo:
"I found your recent change: 'Updated Pro plan price to $15' (PR #42). Do you want me to undo this?"
- If the PR is still open: close it and delete the branch
- If the PR was already merged: create a revert PR and explain:
"Since this change is already live, I'll create a new request to undo it. A developer will need to approve the undo as well."
Discovery Reference
This section is for the agent's internal use during Phase 1 — do not surface these details to the user.
Framework detection
| File in repo root | Framework |
|---|---|
next.config.* | Next.js |
nuxt.config.* | Nuxt |
astro.config.* | Astro |
svelte.config.* | SvelteKit |
angular.json | Angular |
vite.config.* | Vite (check package.json for react/vue/svelte) |
gatsby-config.* | Gatsby |
None + index.html | Static HTML |
Package manager detection
| Lock file | Runner |
|---|---|
bun.lock / bun.lockb | bun |
pnpm-lock.yaml | pnpm |
yarn.lock | yarn |
package-lock.json | npm |
Styling detection
tailwind.config.*or@tailwindcssin CSS → Tailwind.module.css/.module.scssfiles → CSS Modulesstyled-componentsor@emotionin deps → CSS-in-JS.scss/.sassfiles → SCSS- Plain
.css→ Plain CSS
Content pattern detection
Check for separate content/i18n files before editing components:
i18n/,locales/,messages/,translations/directories.mdx/.mdcontent files- CMS configs (contentful, sanity, strapi)
- JSON/YAML data files
If content is in separate files, edit those — not the component source.
Page discovery
| Framework | Page locations |
|---|---|
| Next.js App Router | app/**/page.{tsx,jsx,js} |
| Next.js Pages Router | pages/**/*.{tsx,jsx,js} |
| Nuxt | pages/**/*.vue |
| Astro | src/pages/**/*.astro |
| SvelteKit | src/routes/**/+page.svelte |
| Gatsby | src/pages/**/*.{tsx,jsx} |
| Angular | Routing modules |
| Vite SPA | Router config or App.* |
| Static HTML | *.html in root or public/ |
Config File
Teams can add an optional .pm-editor.yml to the repo root to customize behavior (reviewers, labels, protected files, build commands). See config-reference.md for the full reference.
Examples
For example conversations across different frameworks, see examples.md.