@seoagent-official/seoagent 1.80.0 → 1.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seoagent-official/seoagent",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.81.0",
|
|
4
4
|
"description": "The persistent AI SEO agent for Claude Code. Audits, keyword strategy, briefs, articles, real product screenshots from your repo, and the autopilot loop (cloud detects → CLI executes → ack closes) — other SEO tools write the prompt, SEOAgent runs it.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Draft Review — Visual Review Loop (human-review)
|
|
2
|
+
|
|
3
|
+
An optional, higher-fidelity way for the user to review a draft before it publishes. Instead of pasting the draft into chat and collecting feedback as prose, open it in the browser with [human-review](https://github.com/petergyang/human-review) (MIT, runs fully local via `npx`, no account or API key). The user edits text directly, drags blocks, and leaves comments anchored to exact phrases; you receive everything as one structured batch and apply it to the source.
|
|
4
|
+
|
|
5
|
+
## When to use it
|
|
6
|
+
|
|
7
|
+
Offer this loop in **interactive sessions**, after you have written or rewritten something the user will read: an article (Phase 4), a landing page, a rewrite (Phase 4b), or a draft from an inbox action (`cli_new_content`, `cli_content_update`, `cli_new_landing_page`). It replaces the "show the user the draft in chat" step with a real review surface.
|
|
8
|
+
|
|
9
|
+
Do NOT use it when:
|
|
10
|
+
|
|
11
|
+
- The session is headless / non-interactive (CI, autopilot one-shots) — nobody is there to review.
|
|
12
|
+
- `npx` is unavailable.
|
|
13
|
+
- The user prefers chat review or a PR diff — the PR remains the review surface for `mdx_sync` cluster batches.
|
|
14
|
+
|
|
15
|
+
Offer it once; if the user declines, fall back to chat/PR review and don't re-offer in the session.
|
|
16
|
+
|
|
17
|
+
## The loop
|
|
18
|
+
|
|
19
|
+
1. Write or update the draft file first (repo article, `.seoagent/content/{slug}.md`, or landing page source).
|
|
20
|
+
2. Open it for the user:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx -y human-review path/to/draft.md
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
For a page served by a local dev server the user already runs, open the real route instead of recreating it as a file:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx -y human-review http://localhost:3000/blog/my-post
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
3. Wait for feedback. This blocks until the user hits Send, or the timeout passes:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx -y human-review poll path/to/draft.md --timeout 600
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Keep the poll in the foreground; don't end your turn while it waits. `{"status":"timeout"}` means no feedback yet — run the same poll again. `{"status":"closed"}` means the user ended the review from the browser — stop polling; unsent feedback ships on the next review of the same target.
|
|
39
|
+
|
|
40
|
+
4. Apply the batch, then acknowledge and wait again:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx -y human-review poll path/to/draft.md --ack --timeout 600
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Repeat 3–4 until the user says they are done. To check for waiting feedback without blocking (e.g. at the start of a new turn):
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx -y human-review status path/to/draft.md
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Applying the feedback batch
|
|
53
|
+
|
|
54
|
+
The batch is JSON with `pages[]`, each carrying `comments[]` (anchored to an exact `quote`) and `edits[]` (`before` / `after`, plus `after_html` when formatting changed). Rules:
|
|
55
|
+
|
|
56
|
+
- **`edits` are changes the user already made. `after` is their exact wording — carry it verbatim and never revert or "improve" it.** The user's own words always win over the writing rules; do not run the no-slop pass over text the user typed.
|
|
57
|
+
- Markdown files open rendered; quotes and edits reference the rendered text. Apply every change to the **markdown source**, keeping its syntax (`<strong>` → `**`, pasted `<img src="assets/...">` → ``, keep the relative path).
|
|
58
|
+
- For a localhost page (`kind: "url"`), find the project source that renders the route (MDX, TSX, template) and apply the edits there — never write rendered HTML back into the app.
|
|
59
|
+
- An edit with `kind: "moved"` relocates a whole block — reposition it in the source without rewriting its content.
|
|
60
|
+
- Find each comment by its `quote`; fix every page in `pages`, not just the first.
|
|
61
|
+
- When a comment asks for a rewrite, apply the writing rules from `references/writing-rules.md` — including its voice-preservation section — to YOUR new text, never to the user's.
|
|
62
|
+
- **Do not write a chat reply for each item.** The page reloads when you save; the user sees the result there. Summarize what you applied once per batch.
|
|
63
|
+
|
|
64
|
+
## After the review
|
|
65
|
+
|
|
66
|
+
1. Re-run the self-check from `references/writing-rules.md` on any text you (not the user) rewrote.
|
|
67
|
+
2. Continue the normal flow: `seoagent sync`, cluster link-graph updates, publish per `publishing.strategy`.
|
|
68
|
+
3. Log one changelog line: `[date] Applied human-review batch to {slug}: {N} edits, {M} comments`.
|
|
@@ -103,6 +103,10 @@ Add to JSON-LD:
|
|
|
103
103
|
|
|
104
104
|
Both dates in the schema. Google uses `dateModified` to know freshness without resetting ranking signal.
|
|
105
105
|
|
|
106
|
+
### Step 5b: Optional Visual Review
|
|
107
|
+
|
|
108
|
+
In interactive sessions, offer to open the rewritten article with the visual review loop (`references/draft-review.md`): the user fixes small things directly in the browser and comments on the rest, and you apply the batch to the source. Their exact wording always wins — never revert or "improve" text they typed.
|
|
109
|
+
|
|
106
110
|
### Step 6: Update Internal Links
|
|
107
111
|
|
|
108
112
|
If the rewrite added or changed internal links:
|
package/skills/seoagent.md
CHANGED
|
@@ -37,6 +37,7 @@ This SKILL.md is the orchestration layer. Detailed protocols live in `references
|
|
|
37
37
|
| Task | Read |
|
|
38
38
|
|---|---|
|
|
39
39
|
| Writing or editing ANY content (always, alongside the page-type reference) | `references/writing-rules.md` |
|
|
40
|
+
| Reviewing a draft with the user in the browser (interactive sessions) | `references/draft-review.md` |
|
|
40
41
|
| Running a full audit | `references/audit-checks.md` |
|
|
41
42
|
| Keyword research | `references/keyword-research.md` |
|
|
42
43
|
| Migrating legacy ranking authority after a pivot/rebrand | `references/migration-planning.md` |
|
|
@@ -169,13 +170,13 @@ Offer **once per session per topic**; if declined, drop it and keep working. Nev
|
|
|
169
170
|
4. For each `cli_new_content-<id>.md` file:
|
|
170
171
|
- `Read` it. The frontmatter has `action_id`, `brief_slug`, `primary_keyword`, `cluster`, and `priority`. The body points at the synced brief.
|
|
171
172
|
- **Read the full brief** under `.seoagent/` (briefs file or `strategy/` entry matching `brief_slug`) for the outline, word-count target, and internal-link plan.
|
|
172
|
-
- Write the article following the skill's **content-production protocol** (Phase 4 below), then publish it where this project's content lives (repo `content/` or the connected CMS — you are the publishing engine). Show the user the draft before publishing.
|
|
173
|
+
- Write the article following the skill's **content-production protocol** (Phase 4 below), then publish it where this project's content lives (repo `content/` or the connected CMS — you are the publishing engine). Show the user the draft before publishing (interactive sessions can use the visual review loop — `references/draft-review.md`).
|
|
173
174
|
- **If the action body has a "Screenshots to capture" section** (autopilot flagged this as a SaaS product), follow `references/screenshots.md` — capture real product screenshots from this repo's UI for the relevant sections instead of shipping illustration-only.
|
|
174
175
|
- Acknowledge it: `seoagent ack <action_id>` (or `--failed --reason "skipped; off-strategy"` to decline).
|
|
175
176
|
|
|
176
177
|
5. For each `cli_content_update-<id>.md` file:
|
|
177
178
|
- `Read` it. The frontmatter has `action_id`, `reason` (`declining_clicks`|`low_ctr`|`stale_thin`), and `page_url`; the body has the signals.
|
|
178
|
-
- **Find the page's source** for `page_url`. Apply the revision per `reason`: `declining_clicks` → refresh/expand the content; `low_ctr` → rewrite title + meta description; `stale_thin` → expand and update. Follow the skill's **rewrite/revise protocol**. Reversible edit — show the user the diff (confirm once per session, then proceed).
|
|
179
|
+
- **Find the page's source** for `page_url`. Apply the revision per `reason`: `declining_clicks` → refresh/expand the content; `low_ctr` → rewrite title + meta description; `stale_thin` → expand and update. Follow the skill's **rewrite/revise protocol**. Reversible edit — show the user the diff (confirm once per session, then proceed; interactive sessions can review the revised draft via `references/draft-review.md`).
|
|
179
180
|
- Acknowledge it: `seoagent ack <action_id>` (or `--failed --reason "kept as-is; ..."` to decline).
|
|
180
181
|
|
|
181
182
|
6. For each `cli_sitemap_update-<id>.md` file:
|
|
@@ -189,7 +190,7 @@ Offer **once per session per topic**; if declined, drop it and keep working. Nev
|
|
|
189
190
|
- `Read` it. The frontmatter has `action_id`, `keyword`, `opportunity` (`easy_win` | `competitor_gap`), `volume`, `difficulty`, and `intent`. The body explains why this keyword is worth a page.
|
|
190
191
|
- Cross-reference `.seoagent/keywords.md` for related keywords — they tell you which cluster this page belongs to and which secondary keywords to weave in.
|
|
191
192
|
- Pick an article type from `intent` (commercial/transactional → product or comparison page; informational → guide or pillar). Pick a clean URL slug from `keyword`.
|
|
192
|
-
- Write the article following the skill's **content-production protocol** (Phase 4 — match the article type's quality rules, add internal links from related cluster pages, etc.). Show the user the draft before publishing.
|
|
193
|
+
- Write the article following the skill's **content-production protocol** (Phase 4 — match the article type's quality rules, add internal links from related cluster pages, etc.). Show the user the draft before publishing (interactive sessions can use the visual review loop — `references/draft-review.md`).
|
|
193
194
|
- **If the action body has a "Screenshots to capture" section** (SaaS product), follow `references/screenshots.md` — a landing page for a SaaS product should lead with a real product screenshot in the hero + feature sections, captured from this repo's UI.
|
|
194
195
|
- Publish where this project's content lives (repo `content/` or the connected CMS). Safe (new content) — but still confirm the user wants this specific page before committing.
|
|
195
196
|
- Acknowledge it: `seoagent ack <action_id>` (or `--failed --reason "already covered by /existing-page"` to decline).
|
|
@@ -840,6 +841,10 @@ This is the per-article procedure. When executing an approved **plan** (see "Pla
|
|
|
840
841
|
- **Cloud-hosted (`managed_proxy` / `subdomain`)** — the SEOAgent cloud renders the article, so the body DOES live in `.seoagent/`: write the full article to `.seoagent/content/{slug}.md` with full SEO frontmatter (slug, page_type, title, meta_title, meta_description, canonical, og, twitter, json_ld, images, internal_links) and `seoagent sync`. (No `content track` needed — the full file is the record.)
|
|
841
842
|
8. **Update the cluster's link graph** — for sub_pillar/long_tail writes, edit the parent (and the cluster file) to add the new link UP. For pillar writes, ensure all sub_pillars are referenced.
|
|
842
843
|
|
|
844
|
+
### Draft Review with the User (interactive sessions)
|
|
845
|
+
|
|
846
|
+
When the user is present and a draft is worth their eyes — the first article of a cluster, a landing page, or anything they asked to review — offer the **visual review loop** from `references/draft-review.md` instead of pasting the draft into chat: `npx -y human-review {draft-path}` opens it in their browser, they edit text directly and leave anchored comments, and you apply the whole batch to the source. Offer it once per session; if declined (or the session is headless), fall back to chat/PR review. For `mdx_sync` cluster batches the PR diff remains the default review surface — human-review is for single-draft, tight-loop review.
|
|
847
|
+
|
|
843
848
|
### Product Screenshots (SaaS — do this before AI images)
|
|
844
849
|
|
|
845
850
|
**If `project.md` has `site_type: saas` (or the repo renders a real product UI), prefer real product screenshots over AI illustrations** — they're the highest-converting visual on a SaaS landing page or how-to article. Before falling back to a generated image, **read `references/screenshots.md`** and follow it: scan the page for spots where a UI shot would add value and is missing (hero, feature sections, how-to steps), then capture those screens **from the product's own code in this repo** (using your environment's screenshot capability + the project's dev server — no Playwright/Puppeteer dependency, no paid API), save them under `public/screenshots/`, and reference them with descriptive alt text. If you can't capture (no dev server / no screenshot tool / no real UI), the protocol's fallback leaves a `<!-- SCREENSHOT-TODO -->` marker + an AI image prompt so publishing still works. Non-SaaS sites skip this and go straight to image generation below.
|